How to determin bit depth of a Gtk::Image?
- From: maxime_phan@xxxxxxxxxxx
- Date: 28 Nov 2006 02:11:12 -0800
Hi all,
I'm trying to got the bit depth (typically 8, 16, 24 or 32) of a
Gtk::Image.
Gdk::Pixbuf::get_bits_per_sample() seems to be what I'm looking for
but it always returns 8. Others get methods work perfectly well.
I also tried with Gdk::Drawable::get_depth() after getting the pixmap
with Gtk::Image::get_pixmap. Unfortunately get_pixmap works only
for empty and pixmap image.
Here is the code:
m_Image.set(filename);
Glib::RefPtr<Gdk::Pixbuf> pixbuf = m_Image.get_pixbuf();
std::cout << "bits per sample " << pixbuf->get_bits_per_sample() <<
std::endl;
Any help appreciated.
Thank's
.
- Follow-Ups:
- Re: How to determin bit depth of a Gtk::Image?
- From: zentara
- Re: How to determin bit depth of a Gtk::Image?
- Prev by Date: Re: Signals and threads
- Next by Date: retrieve the standart gateway
- Previous by thread: Opening a file for reading in C: "File too large" error
- Next by thread: Re: How to determin bit depth of a Gtk::Image?
- Index(es):