Re: JPEG -- how do I display one?



On Mon, Nov 20, 2006 at 07:39:36AM -0500, Charles Packer wrote:
> 
> GTK documentation that I've
> been able to find so far has nothing about how to interface
> with standard image formats. 

GtkWidget *image;

image = gtk_image_new_from_file("filename.jpeg");
... add image to some container, show it ...

This is the simpliest interface, you can get more control by
using gdk_pixbuf_new_from_file(), possibly doing some
modification with GdkPixbuf methods and creating the image
widget with gtk_image_new_from_pixbuf().

Yeti


--
Whatever.



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