Developers

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ajitg_4557
Channel Surfer

how to show base64 encoded image in poster node.

I am facing problem to show base64 image to poster node.
please guys help us on this issue.


sub load_Map(json As Object)

json=parseJSON(json)
remove_n=json.MapFlightResult
print"remove Before========>>>>"remove_n

r = CreateObject("roRegex","\n", "i")
remove_new=r.ReplaceAll(remove_n,"")
print"remove After========>>>>"remove_new


ba=CreateObject("roByteArray")
ba.FromBase64String(remove_new)
img=ba.ToAsciiString()
print"img=======>>>>>"img
m.Map.uri=img
m.Map.visible=true

end sub

thanks in advance to All Roku Team.
Tags (1)
0 Kudos
3 REPLIES 3
Tyler_Smith
Streaming Star

Re: how to show base64 encoded image in poster node.

You're looking for something like this:

uri = "tmp:/images/" + someidentifier
ba = CreateObject("roByteArray")
ba.fromBase64String(yourbase64string)
ba.writeFile(uri)

poster.uri = uri
Tyler Smith
Tags (1)
0 Kudos
norcaljohnny
Roku Guru

Re: how to show base64 encoded image in poster node.

What I do for the sake of speed is write an external php script to handle the code as Roku gets bogged down real quick.
Tags (1)
0 Kudos
ajitg_4557
Channel Surfer

still not able to decode base 64 encoded strinig as a poster

Hi,Smith
i still hang on this issue,can you please elaborate more on this.
Tags (1)
0 Kudos
Community is Being Upgraded!

We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. Read more here.

Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 19th and you may notice reduced functionality. In the meantime, for additional assistance, visit our Support Site.

We're sorry for this disruption — we’re excited to share what’s next!