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

_________________________________________________________________
Ten : profite de ton Messenger en illimité sur ton mobile !  
http://mobile.live.fr/messenger/ten/

_______________________________________________
gtkmm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/gtkmm-list

Reply via email to