RSS/Atom feed Twitter
Site is read-only, email is disabled

32 bit bmp files again

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

7 of 7 messages available
Toggle history

Please log in to manage your subscriptions.

32 bit bmp files again Todd Marshall 03 Aug 17:58
  32 bit bmp files again Todd Marshall 03 Aug 18:03
   32 bit bmp files again Pavel 03 Aug 18:43
    32 bit bmp files again Teo Mazars 03 Aug 19:08
     32 bit bmp files again Pavel 03 Aug 19:27
   32 bit bmp files again Todd Marshall 03 Aug 18:44
   32 bit bmp files again Teo Mazars 03 Aug 18:53
Todd Marshall
2014-08-03 17:58:03 UTC (over 10 years ago)

32 bit bmp files again

I know this is an old topic but I am having trouble, producing 24 bit .bmp files is good. If I add alpha layer and save (export) to .bmp, it's not good. (to save 32 bit pixel image) Windows API simply will not load the file. I've tried changing 'save colorspace information' and this does not work.
Any fix? I guess I have to try a different program. Don't need any special functionality, just a 32 bit file that the windows api can load. (the LoadImage() api function in win32)
Thanks!

Todd Marshall
2014-08-03 18:03:15 UTC (over 10 years ago)

32 bit bmp files again

To add to my question thread myself; I can load the file into Paint, but if I try to save it, Paint says '24 bit' only (has no 32 bit option) and if I save that, it's the same size. If I save from Gimp to 24 bit it's 15K. If I save from Gimp to 32 bit it's 20K. so whan I save in Paint, and it says '24 bit' it saves to 20 K file.

On Sun, Aug 3, 2014 at 1:58 PM, Todd Marshall wrote:

I know this is an old topic but I am having trouble, producing 24 bit .bmp files is good. If I add alpha layer and save (export) to .bmp, it's not good. (to save 32 bit pixel image) Windows API simply will not load the file. I've tried changing 'save colorspace information' and this does not work.
Any fix? I guess I have to try a different program. Don't need any special functionality, just a 32 bit file that the windows api can load. (the LoadImage() api function in win32) Thanks!

Pavel
2014-08-03 18:43:38 UTC (over 10 years ago)

32 bit bmp files again

Hi Todd,

just my impression and feelings: 32 bit BMP is an oxymoron. MS has designed that format, but never managed to implement it. That's why they still have their ICO format, which is a color image and 2-bits mask. Instead of implementing full alpha-channel raster format, MS rather accommodated PNG format. So, for example, if you want to create Windows Vista compatible icon with alpha channel, you have to embed a PNG image into the "ico" file.

In other words, you can create 32-bit BMP file, but you will hardly find a software capable of reading it.

Pavel

On Sun, 2014-08-03 at 14:03 -0400, Todd Marshall wrote:

To add to my question thread myself; I can load the file into Paint, but if I try to save it, Paint says '24 bit' only (has no 32 bit option) and if I save that, it's the same size. If I save from Gimp to 24 bit it's 15K. If I save from Gimp to 32 bit it's 20K. so whan I save in Paint, and it says '24 bit' it saves to 20 K file.

On Sun, Aug 3, 2014 at 1:58 PM, Todd Marshall wrote:

I know this is an old topic but I am having trouble, producing 24 bit .bmp files is good. If I add alpha layer and save (export) to .bmp, it's not good. (to save 32 bit pixel image) Windows API simply will not load the file. I've tried changing 'save colorspace information' and this does not work.
Any fix? I guess I have to try a different program. Don't need any special functionality, just a 32 bit file that the windows api can load. (the LoadImage() api function in win32) Thanks!

_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list

Todd Marshall
2014-08-03 18:44:13 UTC (over 10 years ago)

32 bit bmp files again

To add again, The file that Paint saved, that it says is '24-bit' (but it IS 20K in size like Gimp's 32 bit version) works, as a 32 bit file. So the trick is to figure out what Gimp did that produces bad 32 bit .bmp files. Now I need to test the file that was output from Paint, and see if the alpha channel is preserved. Thanks for putting up with me. Todd.

On Sun, Aug 3, 2014 at 2:03 PM, Todd Marshall wrote:

To add to my question thread myself; I can load the file into Paint, but if I try to save it, Paint says '24 bit' only (has no 32 bit option) and if I save that, it's the same size. If I save from Gimp to 24 bit it's 15K. If I save from Gimp to 32 bit it's 20K. so whan I save in Paint, and it says '24 bit' it saves to 20 K file.

On Sun, Aug 3, 2014 at 1:58 PM, Todd Marshall wrote:

I know this is an old topic but I am having trouble, producing 24 bit .bmp files is good. If I add alpha layer and save (export) to .bmp, it's not good. (to save 32 bit pixel image) Windows API simply will not load the file. I've tried changing 'save colorspace information' and this does not work.
Any fix? I guess I have to try a different program. Don't need any special functionality, just a 32 bit file that the windows api can load. (the LoadImage() api function in win32) Thanks!

Teo Mazars
2014-08-03 18:53:20 UTC (over 10 years ago)

32 bit bmp files again

Hi,

To add to my question thread myself; I can load the file into Paint, but if
I try to save it, Paint says '24 bit' only (has no 32 bit option) and if I
save that, it's the same size. If I save from Gimp to 24 bit it's 15K. If
I save from Gimp to 32 bit it's 20K. so whan I save in Paint, and it says
'24 bit' it saves to 20 K file.

First, keep in mind that most of bmp files in the wild are in an old version of the format that doesn't properly support transparency through that alpha channel (4th byte). That's what you are trying to do right? See for example https://bugzilla.gnome.org/show_bug.cgi?id=697431 for the "load" side of the issue. And a lot of software don't handle latest versions of the format (firefox for instance).

That said, Windows should be able to load any BMP image exported by GIMP, so it could be a bug in GIMP. Please, open a bug report on bugzilla and add there the exported image, the steps and options you used to produce that exported image, and the chunk of code using the Windows API that fails to load the image. If that is possible, please.

Kind regards,

Téo

On Sun, Aug 3, 2014 at 1:58 PM, Todd Marshall wrote:

I know this is an old topic but I am having trouble, producing 24 bit .bmp
files is good. If I add alpha layer and save (export) to .bmp, it's not
good. (to save 32 bit pixel image) Windows API simply will not load the
file. I've tried changing 'save colorspace information' and this does not
work.
Any fix? I guess I have to try a different program. Don't need any special functionality, just a 32 bit file that the windows api can load.
(the LoadImage() api function in win32) Thanks!

_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership:
https://mail.gnome.org/mailman/listinfo/gimp-developer-list List archives: https://mail.gnome.org/archives/gimp-developer-list

Teo Mazars
2014-08-03 19:08:04 UTC (over 10 years ago)

32 bit bmp files again

Hi Todd,

just my impression and feelings: 32 bit BMP is an oxymoron. MS has designed that format, but never managed to implement it.

[...]

In other words, you can create 32-bit BMP file, but you will hardly find
a software capable of reading it.

Pavel

You mean that even the Windows API is not be able to load images exported in the latest versions of the BMP format? OMG Oo. If that is true, then that nails the issue...

Téo

Pavel
2014-08-03 19:27:07 UTC (over 10 years ago)

32 bit bmp files again

My last experience was with Windows Vista and functions like BitBlt were definitively not aware of alpha channel. The only Windows API which seemed to do something with alpha channel was AlphaBlend and TransparentBlt, but I have never managed to get it work. Maybe it works on Windows 7 or newer, but I have some doubts about it.

Anyway, I think that most of the image applications rely on BitBlt, MaskBlt and StretchBlt, or StretchDIbits, none of them is alpha aware.

On Sun, 2014-08-03 at 21:08 +0200, Teo Mazars wrote:

Hi Todd,

just my impression and feelings: 32 bit BMP is an oxymoron. MS has designed that format, but never managed to implement it.

[...]

In other words, you can create 32-bit BMP file, but you will hardly find
a software capable of reading it.

Pavel

You mean that even the Windows API is not be able to load images exported in the latest versions of the BMP format? OMG Oo. If that is true, then that nails the issue...

Téo