[Gimp-user] Problem with exporting as .bmp for MS Windows BITMAP resource



I wanted to export an image as a .bmp file for use as a BITMAP resource in an MS
Windows .rc file.
The CBitmap method for loading the resource failed.
The road to making the file usable turned out *not* to be as straight as I had
hoped.

Looking at the header showed that the saved .bmp was compressed (type=3).
I converted the file using ImageMagick to the older "bmp3" format.
Now the file contained uncompressed (type=0) RGB data and loaded nicely into the
application.

Now the problem was the alpha channel.
Apparently, the ImageMagick team last year (on a request) added the possibility
to force
bmp3 to include the alpha channel with the --alpha flag.
Now the image looked strange in areas where there was a gradient in the alpha.
It seems like Windows wants the RGB data to be premultiplied with the alpha
channel.

So, after a long time searching through forums, I finally came up with an
ImageMagick
command line which converted a .png to a .bmp (bmp3) with premultiplied alpha.
Using this, my toolbar icons looked great, without any alpha-related border
artifacts.

My questions are:
1. Has anyone experienced the same problem?
   (Besides the guy requesting the --alpha flag from the ImageMagick team)  ;)

2. Why doesn't .bmp-export in GIMP have options to handle this?
   Is the image format used in any real extent on any other platform???
   (Like "export for Windows resource compatibility")

-- 
BengtV (via www.gimpusers.com/forums)


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