WizardSmallImageFile is Black in 6.3.x but works in 6.2.2

122 views
Skip to first unread message

Tim Parnell

unread,
Jun 24, 2024, 10:47:21 AM (11 days ago) Jun 24
to innosetup
Making no changes to my script, the WizardSmallImageFile in the top right corner is showing up black when compiled with 6.3.0 and 6.3.1. Reverting to 6.2.2 the icon works as expected.

Has anybody seen this?
Is there something I need to change?

I've attached my icon bmp.
Lifeboat_Installer_Icon.bmp

Martijn Laan

unread,
Jun 24, 2024, 12:10:14 PM (11 days ago) Jun 24
to innosetup
Hi,

I'm not sure why there's a difference between 6.2 and 6.3 but here are two observations:
  • If I open your bitmap in Paint.net, save it and use this version it works.
  • Also if I prevent stretching (your bitmap is one pixel wider that what the help file says) by setting WizardImageStretch=false it works even without resaving.  So another way to prevent stretching is to make the image the size which is specified in the help file.
Somehow the stretching code (which hasn't changed since 2019) doesn't like your bitmap.

Greetings,
Martijn

Op maandag 24 juni 2024 om 16:47:21 UTC+2 schreef Tim Parnell:

Tim Parnell

unread,
Jun 24, 2024, 12:35:54 PM (11 days ago) Jun 24
to innosetup
Thank you for your help! I have been using this bmp for 3 years at least! I had never noticed it was too large by 1px. Correcting the size seems to have worked.

Thanks,
Tim

DRON

unread,
Jun 24, 2024, 12:43:11 PM (11 days ago) Jun 24
to innosetup
> Somehow the stretching code (which hasn't changed since 2019) doesn't like your bitmap.

This is because the height of BMP is negative.
Image 002.png

понедельник, 24 июня 2024 г. в 19:35:54 UTC+3, Tim Parnell:

DRON

unread,
Jun 24, 2024, 1:18:40 PM (11 days ago) Jun 24
to innosetup
Martijn Laan
Since you using XE11 to compile InnoSetup, you can replace the entire `Resample.pas` with a simple `EnableScaledDrawer(TWICScaledGraphicDrawer)`.

понедельник, 24 июня 2024 г. в 19:43:11 UTC+3, DRON:

Martijn Laan

unread,
Jun 25, 2024, 12:32:33 AM (11 days ago) Jun 25
to innosetup
Interesting, thanks. What tool are you using for this?

In Delphi the height is displayed correctly as 56 and I don't see anything special going on during the stretching. There must be another issue with the pixel data?

Also weird that it worked fine before.

Greetings,
Martijn

Op maandag 24 juni 2024 om 18:43:11 UTC+2 schreef DRON:

DRON

unread,
Jun 25, 2024, 2:15:27 PM (10 days ago) Jun 25
to innosetup
> What tool are you using for this?

> Also weird that it worked fine before.
Actually `Resample.pas` contains support for top-down bitmaps (if SrcLineSize >= 0 then...), but perhaps the new version does something strange with `ScanLine`. Unfortunately I don't have access to latest versions of Delphi.

вторник, 25 июня 2024 г. в 07:32:33 UTC+3, Martijn Laan:

Martijn Laan

unread,
Jun 29, 2024, 4:02:28 AM (7 days ago) Jun 29
to innosetup
I compared Delphi 11.3 and Delphi 10.4's ScanLine code and it's the same. While debugging I don't see other obvious problems either.

Do you have any suggestions on how to further investigate?

BTW, you can get Delphi 11 for free at https://www.embarcadero.com/products/delphi/starter/free-download and also the IS' projects have been reorganized and cleaned to make it much easier to get it up and running en debuggable.

Thanks for your TWICScaledGraphicDrawer suggestion but would prefer not to add the dependency on windowscodecs.dll.

Greetings,
Martijn

Op dinsdag 25 juni 2024 om 20:15:27 UTC+2 schreef DRON:
Reply all
Reply to author
Forward
0 new messages