Forum Discussion

ioan's avatar
ioan
Roku Guru
9 years ago

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.

1 Reply

  • 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)