Re: How to get information of images



On Sat, May 13, 2006 at 10:37:55PM +0200, LI Ying wrote:
I want to write a libvncserver which can load diffrent kinds of images.
I need the information of images, so that I can tell the server how to
load it.
With the help of lib-pixbuf, I can get the information about the height
and width.
But I need to know other information like "bitsPerPixelInFile" and
"bytesPerPixel".
How can I do it?

GdkPixbufs are always in the 8 bits-per-channel RGB or RGBA
formats (you can check the presence of alpha with
gdk_pixbuf_get_has_alpha()) so there is no other information
to get.  If the image is in a different format it is
converted upon loading.  (There are some provisions for
different data formats, but the only really possible is the
described one).

If you need to query/manipulate the original images, you
can either use particular libraries (libpng, libjpeg,
libtiff, ...) or use a general image manipulation library
(there are several but I cannot recommend any so I will
refrain).

Yeti


--
Anonyms eat their boogers.



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