Re: How to get information of images
- From: David Nečas (Yeti) <yeti physics muni cz>
- To: LI Ying <ying li enst-bretagne fr>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: How to get information of images
- Date: Sun, 14 May 2006 00:07:20 +0200
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]