Hi ,
I am currently working on a Image Processing tool. I am using Gnome::Canvas to display the image with the help of pixbuf. The situation in which I am strucked is on creating Pixbuf from file or data , even though I have 1 bit image, gdk:: pixbuf will convert it into 24 bit image or 32 bit image. Glib::RefPtr<Gdk::Pixbuf> pixBuf; pixBuf = Gdk::Pixbuf::create_from_file( fileName ); Glib::RefPtr<Gdk::Pixbuf> newpicture; newpicture = Gdk::Pixbuf::create(Gdk::COLORSPACE_RGB, true, 1, width, height); // This to be checked ??? newpicture = Gdk::Pixbuf::create_subpixbuf (pixBuf, ax1, ay1, width, height); I have to implement one feature which changes 24 bit image to 1 bit , 8 bit , 32 bit and vice versa. How can I do that ? Question is why gdk::pixbuf changes every image into 24 or 32 bit ? don't it makes image manipulation slow too ? Any help will be appreciated. Regards , Ramachandra |