mp4096 / indentex

An indentation-based superset of LaTeX
MIT License
9 stars 2 forks source link

Custom Banner Image for Windows Installer #42

Closed syxolk closed 7 years ago

syxolk commented 7 years ago

Now that we have a project logo and icon we can customize the windows installer (hooray)!

It works by adding two images banner.jpg and dialog.jpg to the package and this two lines in indentex_template.wxs:

<WixVariable Id="WixUIBannerBmp" Value=".\banner.jpg" />
<WixVariable Id="WixUIDialogBmp" Value=".\dialog.jpg" />

It currently looks like this:

image image image

Image sizes are 493x58 and 493x312.

Images can be JPG or BMP. Windows 8 added support for PNG and other formats but we want to support Windows 7 (?). Since bitmaps are quite large (dialog.bmp is 452 KB) I decided to use jpegs with quality 100%.

mp4096 commented 7 years ago

Yep, I like it! :+1: Would you mind opening a PR?

syxolk commented 7 years ago

Guide for even smaller images 🤣:

Results:

Image PNG (optipng -o7) JPG (quality=100%) BMP (palette=256, RLE)
banner 2.7 KB 7.5 KB 2.8 KB
dialog 5.1 KB 15.1 KB 6.5 KB

image

mp4096 commented 7 years ago

Ugh, I have a bad feeling about this. Does WiX work properly with RLE?

mp4096 commented 7 years ago

And I have to check the colours... I used the full RGB palette.

mp4096 commented 7 years ago

Ok, the images are so small that I can't see any difference whatsoever.

mp4096 commented 7 years ago

what is it, a banner for ants?

syxolk commented 7 years ago

Does WiX work properly with RLE?

I'm pretty sure it works because someone suggested it in 2008 (!): .BMP files can be RLE-compressed. I don't know if they support any other compression algorithms.

I used the full RGB palette.

GIMP generates a palette of 256 colors so that it closely resembles the colors of the image. It's not a predefined palette.

mp4096 commented 7 years ago

GIMP generates a palette of 256 colors

OMG this is crazy. I've completely missed the 'optimal' part. Sure, I have fewer than 256 colours.

mp4096 commented 7 years ago

Closed in #43