Archive: MUI bitmap resizing


MUI bitmap resizing
I photoshopped a bitmap for my installer, and used the recommended size (164x314), which should look like this:
http://img.photobucket.com/albums/v1...ve/bmpgood.jpg
Yet, when the installer runs, the image is resized, and appears like:
http://img.photobucket.com/albums/v1...ave/bmpbad.jpg

How can I fix the blurry distorted look? I used
!define MUI_WELCOMEFINISHPAGE_BITMAP (path to my bmp file)


!define MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH

It's in the readme :p

-Stu


That doesn't work, and the readme talks about images which are smaller. I can send you a screenshot of how it appears when I use the syntax you listed, but it's the default image.

From the readme:
MUI_HEADERIMAGE_BITMAP_NOSTRETCH
Do not stretch the installer header bitmap to fit the size of the field. Use this option only if you have an image that does not use the whole space. If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.


I think the answer is at the end of the last sentence of the paragraph you quoted from the MUI ReadMe:

the size of the field will be different if the user has a custom DPI setting.
My display is set to "Normal size (96 dpi)" and when I build a MUI installer using the default UI the installer window is 503 x 386 pixels and the Welcome page image space is 164 x 314 pixels.

The Welcome page screenshot you supplied is bigger than this (585 x 441 pixels) so the space for image is bigger than 164 x 314 pixels (which is why your image gets stretched).

Check your DPI setting to see if this is why your image is being stretched.

Again, I am not using the NOSTRETCH option (which is what that Readme is for).

:igor:


Again, I am not using the NOSTRETCH option (which is what that Readme is for).
Perhaps I should have quoted the entire sentence?
If you have a full size bitmap that fits exactly, you should not use this option because the size of the field will be different if the user has a custom DPI setting.
This sentence explains that the 164 x 314 pixel size only applies when the normal DPI setting is used - this happens even if you do not use the option.

If you change the DPI setting the image field size changes.
the size of the field will be different if the user has a custom DPI setting
The screenshot shows that your installer window is larger than normal, therefore the space for the image is larger than normal so the 164 x 314 image gets stretched to fill the space.

I said MUI_WELCOMEFINISHPAGE_BITMAP_NOSTRETCH, not MUI_HEADERIMAGE_BITMAP_NOSTRETCH.

-Stu


Originally posted by pengyou
Perhaps I should have quoted the entire sentence?This sentence explains that the 164 x 314 pixel size only applies when the normal DPI setting is used - this happens even if you do not use the option.

If you change the DPI setting the image field size changes.The screenshot shows that your installer window is larger than normal, therefore the space for the image is larger than normal so the 164 x 314 image gets stretched to fill the space.
This may be out of the realm of NSIS, but I'm not sure... why is my installer showing the wrong size then?

And Afrow, sorry. Also, even though, that still didn't work... I get the default blank again. I'm looking at DPI FAQs and such... I remade my image at 75 dpi... which didn't work.

The trouble with this whole resizing issue is that I'm not sure how to determine whether my installer is causing the problem (e.g. have I used some incorrect setting?) or whether my image that I photoshopped is wrong (72 dpi was the original, default setting Photoshop used to make the bitmap, which I then later re-made from scratch at 75 dpi). I'm looking through the help files, and FAQs, but this seems like it's something that should never go wrong... So if it's an NSIS issue, I'm even more perplexed. Any advice? I just have a feeling I shouldn't need to spend two hours looking through old posts to get my bitmap to work, or more information should exist in the readme (I have been reading and re-reading and re-re-reading it all day)... kinda frustrating.

The size also depends on the font. It seems you've changed yours to Comic Sans MS which is probably bigger than the default.


Thank you kichik, that solved it instantly.

And thank you pengyou and Afrow, too, for being patient through my misunderstandings. :)

Is there somewhere in the documentation that could make the association between bitmap distortion and font selection more apparent? I can't see how a neophyte like myself could ever have discovered it without the help of a master.