Re: Code for Processing PNG Graphics



On Mon, 22 Dec 2003 10:21:54 -0600 (CST)
"John J. Boyer" <director chpi org> wrote:

Could someone point me to a reasonably simple example of code for 
processing png graphics. The png manual mentions a file called example.c, 
but I can't find that file.

Just use gdk_pixbuf_new_from_file(const char *filename, GError **error); in
GTK+2.x.From the docs:

"Creates a new pixbuf by loading an image from a file. The file format is
 detected automatically. If NULL is returned, then error will be set. Possible
 errors are in the GDK_PIXBUF_ERROR and G_FILE_ERROR domains."

GDK pixbuf comes with loaders for jpg, bmp, ico, png, gif, ras, xpm, xbm, pnm
and tiff.

Roland
-- 
R.F. Smith                           /"\    ASCII Ribbon Campaign
r s m i t h @ x s 4 a l l . n l      \ /    No HTML/RTF in email
http://www.xs4all.nl/~rsmith/         X     No Word docs in email
                                     / \    Respect for open standards

Attachment: pgpGIOzdYYN_o.pgp
Description: PGP signature



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