Displaying JPEGs



I am relatively new to GTK and am trying to get jpegs to display.  I am
using the libjpeg library and that is not a problem.  I have successfully
loaded the image into an array of memory.

My problem comes in trying to display it.  My first idea was to use
successive calls to gdk_draw_point.  This works, however, it takes _way_
too long.  Since I am running on an 8-bit display, I also have to allocate
color entries (I am not entirely sure if I am doing this correctly,
but...).  

What would be the correct way to get large images to display?
Should I be using pixmaps or some other object?

I have read through some of the archives to the list, but have been unable
to find anything that solves my problem.  Does anyone know of any sample
code for loading an array of image data into a pixmap?  I also tried to
use things like gdk_pixmap_create_from_data (), but I don't know what
XImage format is, so that obviously didn't work.

Thank you for any help you can provide.

Mike Lindahl
mlindahl@princeton.edu



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]