17

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

ph1ash
  • 371
  • 3
  • 13
  • Maybe a silly question, but is it a real BMP or some other format with BMP extension? – RobeN Jun 05 '13 at 15:01
  • Isn't that image so ugly that InnoSetup doesn't want to load it :-) ? Bit depth 8 bpp (256 colors) is quite low for today's standard. But seriously, this should not be a problem. – TLama Jun 05 '13 at 15:15
  • Agreed! I've tried it at higher bit depths with no luck - 16,24,32 :( And it's a .jpeg I imported to GIMP and then converted to a .bmp – ph1ash Jun 05 '13 at 15:21
  • Maybe you could share this BMP file with us? I assume you want to use it as `WizardImageFile=DRIVE:\PATH\MyNewBMPFile.bmp` – RobeN Jun 06 '13 at 08:48
  • Inno doesn't care what size it is. If it's saying it's not valid, then it's not a valid bitmap. Ensure it is actually a bitmap file (first two bytes are `BM`). – Deanna Jun 06 '13 at 10:15
  • Thanks for the help so far everyone! Deanna, the file does contain BM as the first two bytes. RobeN, that's correct. The code I'm using is WizardImageFile=sidebar2.bmp . I also linked the file in the original post. – ph1ash Jun 06 '13 at 15:56
  • @ph1ash - is it all black? I have tried that BMP and it works fine. – RobeN Jun 06 '13 at 16:50
  • Yup. It's all black. I keep getting the 'Bitmap is not valid' error still :(. Did you use the same code as I did? WizardImageFile=sidebar2.bmp? Thank you for taking time to check into this @RobeN ! – ph1ash Jun 06 '13 at 18:24
  • @ph1ash - I have placed BMP file in the same folder I have my ISS file and tried to compile the dummy installer. Then I run it and had black WizardImage. No problems. – RobeN Jun 06 '13 at 19:10
  • 1
    I didn't analyzed the image, since I'm lazy and because I wouldn't use image for making black area of a `TBitmapImage` object :-) I would fill it with black [`from code`](http://pastebin.com/g9n6EA0Z). – TLama Jun 07 '13 at 06:51
  • 3
    Could it be something similar to [this issue](http://stackoverflow.com/q/11473521/588306)? – Deanna Jun 07 '13 at 12:09
  • 1
    @Deanna - That was it! Exported the image without the color space information in 24 bit color depth and it worked on the first try. Thank you everyone for your help! =) – ph1ash Jun 07 '13 at 13:16

3 Answers3

24

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)
Youngy
  • 516
  • 4
  • 8
  • 1
    THanks bro, i dont know what made you guess people will be using gimp & shit, but hey, are a youngi'n :) ... – Elltz Aug 01 '16 at 05:19
  • 1
    Gimp is an amazing software! There are no odds about an Open Source application that has as many capabilities as photoshop and even more. Huh?? – Jonathan Dec 22 '17 at 06:32
7

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.

Community
  • 1
  • 1
  • Thanks, worked Great for me, I find that the max size that inno documentation says 164x 314 does not work well at all. The size that worked perfectly for me was 191 X 385. – Alex Nov 16 '16 at 10:46
0

Another option is to open the PNG or other format with Paint (may need to be downloaded from Store in the latest Windows versions) and save it as BMP. It will automatically select 24-bit depth and other settings will be compatible.

New Paint Lo

BirukTes
  • 45
  • 10