04-18-2012 11:21 PM
The "Gesture" sample app is a good start for me, since I want to load and display an image full screen.
However, my app needs to change the image that is being displayed later on.
I have been successful at loading the new JPEG image via:
io_stream_t* memory_stream = io_open(IO_MEM, IO_READ, num_jpeg_bytes, jpeg_bytes);
rc = img_load(ilib, memory_stream, &callouts, &img);
... but the new image isn't displayed on the screen. I'm assuming this is because the decode_setup function that is used to load the image on initial load doesn't work for subsequently changing the image, but I'm not sure how it needs to be changed.
... but it doesn't seem to tell me anything more than I already know.
I suppose the question is this: If you load an image into an img_t structure, how do you then take that img_t and update the screen to display that image full screen?
Solved! Go to Solution.
04-20-2012 11:42 AM
The decode_setup callout provided should successfully load any subsequential images into the render buffer. However this alone will not display the image on the screen. You will need to call screen_post_window() after your call to img_load to make your changes to the render buffer visible.
for more information, or the main() function of the Gestures sample for an example.