Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
ioan
Roku Guru

Display a JPG that is into a roByteArray?

I'm trying to implement motion-jpeg and I'm having problems with converting roByteArray to jpg. 
Right now I'm doing this
frame = CreateObject("roByteArray")
...
frame.WriteFile("tmp:/photo.jpg")
dfDrawImage(screen, "tmp:/photo.jpg",0,0)


Is there a way to show the jpg without first saving it to a temporary file?

Thanks.
https://github.com/e1ioan/
http://rokucam.com
0 Kudos
1 REPLY 1
EnTerr
Roku Guru

Re: Display a JPG that is into a roByteArray?

Not to my knowledge. My tack would be save to tmp and show from there.
But try using roBitmap directly instead of dfDrawImage(), which is just a utility function written in brightscript (i.e. no hidden magic)
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.