Re: [gtkmm] Why gdk::Pixbuf makes every image to 24bit or 32 bit ?



Hi,

Thanks for the reply. 

Finally should we conclude, that at present it is not possible to deal 
with 1, 8 or 16 bit images, using Gdk::Pixbuf ?

Regards,
Ramachandra



----- Original Message ----- 
From: "Anastasios Bassoukos" <abas aix meng auth gr>
To: "Ramachandra Putti" <ramachandrap dpsl net>
Cc: <gtkmm-list gnome org>
Sent: Tuesday, February 24, 2004 3:11 PM
Subject: Re: [gtkmm] Why gdk::Pixbuf makes every image to 24bit or 32 bit ?


> On Tue, 2004-02-24 at 10:34, Ramachandra Putti wrote:
> > Hi ,
> >    I am currently working on a Image Processing tool. I am using 
> 
> Why? Aren't there enough already?
> 
> > Gnome::Canvas to display the image with the help of pixbuf.
> 
> Hell, you won't be doing any heavy-duty image displaying then, correct? 
> 
> >    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 ?
> 
> Have a look at the Gimp source.
> [flamebait mode=off] You have to understand that *you* will need to take
> care of the internal representation of images to 
> 
> >      Question is why gdk::pixbuf changes every image into 24 or 32 bi
> > t ? 
> > don't it makes image manipulation slow too ?
> 
> No. It makes for less code, as it makes the image manipulation routines
> simpler. Also, note that pixbufs are only one step removed from the
> display, which is probably not abstract enough for your needs.
> 
> >  Any help will be appreciated.
> 
> You could use Gdk::Images, they do implement different bit-depths, but
> then you will need to implement zooming and clipping, and that's why you
> have a canvas, correct?
> 
> > Regards ,
> > Ramachandra
> 
> HTH,
> Tassos
> 
> -- 
> Beware of he who would deny you access to information, for in his
> heart he dreams himself your master." 
> -- Commissioner Pravin Lal, Sid Meier's Alpha Centauri



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