Writing a DIB image
Damian Dixon <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <CAJjdW1zXNoFg=J6ZNaM0Lmr_gjqZTOb2L1g67XPJqf0T-_=BoQ@mail.gmail.com> |
Hi,
I think I may have found an issue with writing a DIB.
I load an image that is basically an 8bit monochrome image.
Image reports the depth as 8, greyscale and monochrome.
I make sure that the image is marked as not monochrome as I want to create
a DIB that is 8bit's (not 1 bit depth) as follows:
image.monochrome( false );
image.type( PaletteType );
image.classType( PseudoClass );
However in dib.c, WriteDIBImage:
The parameter image_info is ignored.
which means that the lines around 1185 are executed instead of obeying what
is in image_info.
if (characteristics.monochrome)
dib_info.bits_per_pixel=1;
In fact the settings in image_info are not used very much at all in this
method.
I don't know enough about GraphicsMagik to known if this is expected
behaviour. However I would expect if I say that the image is not monochrome
then WriteDIBImage should respect my settings.
So is there another way of ensuring that I can write a DIB in the depth
that I requested?
Thanks
Damian
PS:
Yep I know that DIB's are ancient and a bit naff, but the software I am
updating is riddled with them... so it has to be one change at a time.
------------------------------------------------------------------------------
_______________________________________________
Graphicsmagick-help mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help