Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Level 8

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
Highlighted
Level 10

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