Re: gdk_rgb_buf and image loading



dov imagic weizmann ac il writes:

> * Currently pixbufs are always stored as at least 24 bits per pixel
>   internally. This is a waste of memory for grey level and bitmap
>   images. It looks like the gdk pixbuf sources have been written in
>   anticipation of support for other bit depths. Are there any plans of
>   actually implementing this?

Gdk-pixbuf can indeed be extended to support grayscale and bilevel
images; you just need to add something to the GdkColorspace enum and
the corresponding code.

As soon as somebody sends me a patch to do this, I'll happily
integrate it.

> * Are there any plans of adding an additional depth parameter in
>   addition to width and height to the pixbuf in order to support
>   multiple pages? This would mean making gdk_pixbuf stateful in
>   order to point to what page is currently displayed. This is needed
>   in order to load multi-page tiff and MNG files.

You should use GdkPixbufAnimation for this.  Each page or frame in a
MNG would be a GdkPixbufFrame.

> Aside from this, I found gdk_rgb_pixbuf a real pleasure to use. But
> documentation would be handy. Especially an explanation of the meaning
> of the different interpolation types. I figured out what BILINEAR and
> NEAREST mean, but what are TILES and HYPER?

This is documented in the API reference.  Look somewhere around
$(prefix)/gnome/html/gdk-pixbuf/gdk-pixbuf-scaling.html.

Good luck,

  Federico




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