Skip to content
⌘ NSIS Forum Archive

MUI_HEADERIMAGE_BITMAP not working

4 posts

albercuba#

MUI_HEADERIMAGE_BITMAP not working

Hello everyone.

I am trying to insert my custom images in the installer and I create a 150x57 pixels image (nsis.bmp) to use as MUI_HEADERIMAGE_BITMAP and it does not work. I also create a 164x314 pixels image (win.bmp) for MUI_WELCOMEFINISHPAGE_BITMAP and it does not work either.

I know the configuration file is ok because if I use an old image that came with the installer I can see it, but if I replace it it does not work.

I create the images with GIMP in Linux.

I use RGB.

this are my lines

-------------------------------------------------

;Modern UI Configuration

Name "${PRODUCT_NAME} ${OPENVPN_VERSION}"

!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_FINISHPAGE_NOAUTOCLOSE
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_ABORTWARNING
!define MUI_ICON "${HOME}\openvpn.ico"
!define MUI_UNICON "${HOME}\openvpn.ico"
!define MUI_HEADERIMAGE
!define MUI_HEADERIMAGE_UNBITMAP "${HOME}\nsis.bmp"
!define MUI_HEADERIMAGE_BITMAP "${HOME}\nsis.bmp"
!define MUI_HEADERIMAGE_RIGHT
!define MUI_WELCOMEFINISHPAGE_BITMAP "${HOME}\win.bmp"
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${HOME}\win.bmp"
!define MUI_UNFINISHPAGE_NOAUTOCLOSE

and a bit further down I have:

ReserveFile "${HOME}\win.bmp"

Can anyone help me?

Thanks
Anders#
The MUI uses the LoadImage Windows function. I'm guessing a 24bpp should work but you need to save it in the correct BMP format. It is not unusual for *nix tools to save BMPs in a undocumented BMP version that Windows is not always compatible with. Choose the Windows v3.x format (BITMAPCOREHEADER or BITMAPINFOHEADER) if possible...
dothebart#
Creating the file using Imagemagic...

According to


Imagemagic produces the correct file format for this if you prefix the filename with "BMP2:"

Which created a file for me that would display.