Images created with SaveAsBMB

Discussions about image processing and document imaging.
Post Reply
okovongo
Posts: 2
Joined: Wed Jun 13, 2007 9:54 am

Images created with SaveAsBMB

Post by okovongo » Thu Jun 14, 2007 1:36 am

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

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Thu Jun 14, 2007 9:35 am

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

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Post by Loïc » Thu Jun 14, 2007 9:39 am

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

okovongo
Posts: 2
Joined: Wed Jun 13, 2007 9:54 am

Post by okovongo » Fri Jun 15, 2007 9:10 am

Converting the image to 24 bit using ConvertTo24Bpp() solved the problem.

Thanks a lot
Peter

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest