Re: How to embed/inline jpg images in compressed form
- From: Sven Neumann <sven gimp org>
- To: Christof Petig <christof petig-baender de>
- Cc: gtk-list gnome org
- Subject: Re: How to embed/inline jpg images in compressed form
- Date: 16 Jun 2002 13:41:55 +0200
Christof Petig <christof petig-baender de> writes:
> Learning to praise the features of gtk+-2.0 I quickly came to a question:
>
> Is it possible to embed (or inline if you prefer) jpeg (or png) images
> in an gtk+ 2.0 application without uncompressing them (as done via
> gdk-pixbuf-csource).
I haven't tried but it should work using the pixbuf-loader API:
GdkPixbufLoader * gdk_pixbuf_loader_new (void);
GdkPixbufLoader * gdk_pixbuf_loader_new_with_type (const char *image_type,
GError **error);
gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
const guchar *buf,
gsize count,
GError **error);
GdkPixbuf * gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader);
GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
gboolean gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
GError **error);
you create a new pixbuf loader, feed it the inline data, close it,
retrieve the pixbuf and unref the loader. Voila.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]