Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Inno Setup Invalid Bitmap Image

I'm trying to replace the sidebar image on the start page of my installer. I keep getting the error 'Bitmap image is not valid'. The specs match the default Inno Setup installer sidebar .bmp exactly. The image I'm trying to use has dimensions of 164 x 314 and has a bit depth of 8 which is what the documentation recommends.

Is there something I'm missing? Any tips are appreciated!

Here's the link to the picture

like image 964
ph1ash Avatar asked Jun 05 '13 14:06

ph1ash


2 Answers

If you are making a BMP from within GIMP and are exporting to a BMP, use the following options:

  • Compatibility Options -> Do not write color space information
  • Advanced Options -> 24 bits (R8 G8 B8)
like image 152
Youngy Avatar answered Nov 17 '22 02:11

Youngy


I have been able to circumvent this problem by taking a screen capture of my bitmap image, opening a graphic editor, pasting the screen cap and cropping it back to the original size, then saving it as a new bitmap image.

The images I create on my Mac with Pixelmator have this problem. If I used Photoshop 6 on Windows I do not have any issues.

That makes me think it's probably related to headers as described in the link Deanna provided, but since I can't find a good way to easily remove headers this screenshot workaround has been the best solution for me.

Edit: Sounds like Pixelmator includes colorspace information in the header, and Photoshop 6 does not. Reading through all the comments I see that Deanna's link to this question solved the problem: do not include colorspace info when exporting.

Edit: I've also been able to circumvent the problem by opening the file in preview, pressing save, overwriting the original bmp file, and recompiling the setup. Easier than the screencap method.

like image 7
RebrandSoftware Avatar answered Nov 17 '22 01:11

RebrandSoftware