Page 1 of 1

Images created with SaveAsBMB

Posted: Thu Jun 14, 2007 1:36 am
by okovongo
I am using the SaveAsBMP method to create a bitmap image for use in a report. The image is displayed correctly in a MSWord report but displays as a solid black image in Gupta Report Builder.

The BMP image that is created with the SaveAsBMP method is 377Kb. It displays correctly in MSPaint but after changing the image by adding just a dot to it and then save it in MSPaint, the image size shrinks to 283Kb and this image can now be viewed in the Gupta Report.

Image created with SaveAsBMP Image

Image created with SaveAsBMP and then saved with MSPaint Image

I am using GdPicture Lite version 2.71.

Can you please let me know how I can fix this?

Thanks
Peter

Posted: Thu Jun 14, 2007 9:35 am
by Loïc
Hi,

It is normal:


The image saved with GdPicture [Pro] has 32BPP color depth.

The image saved with mspaint has 24BPP color depth.

Few old softwares can't read 32 BPP image colors.


If you want to save bmp as 24 BPP color with GdPicture [Pro] you have just to call the ConvertTo24Bpp() methode before saving the native image.


Best regards,

Loïc Carrère

Posted: Thu Jun 14, 2007 9:39 am
by Loïc
PS:


24 bpp Image use 24 bits per color (8 for Red, 8 for Green, 8 for Blue)

34 bpp Image use 32 bits per color (8 for Alpha (transparency, 8 for Red, 8 for Green, 8 for Blue)



Your first Image was 32bits for 377Kb

If you convert it to 24 BPP the new size will be:

377 * (24 / 32) = 282.75 Kb


Best regards,

Loïc Carrère

Posted: Fri Jun 15, 2007 9:10 am
by okovongo
Converting the image to 24 bit using ConvertTo24Bpp() solved the problem.

Thanks a lot
Peter