Is it possible to use .png images for WiX bitmaps

前端 未结 4 642
有刺的猬
有刺的猬 2020-12-19 02:48

I am using 2 500K bitmaps in to display images on my WiX dialogs.

They dramatically increase the size of the installation package, and what is worse - it looks there

相关标签:
4条回答
  • 2020-12-19 02:53

    The Windows Installer documentation for the Bitmap control states that the image should be a "bitmap" -- presumably a .BMP file -- or a JPEG.

    You have to remember, when working with WiX, that it's based on Windows Installer. This means that any limitations in WiX are often caused by limitations in the underlying Windows Installer implementation.

    .BMP files can be RLE-compressed. I don't know if they support any other compression algorithms.

    0 讨论(0)
  • 2020-12-19 02:57

    The WiX toolset isn't tethered to BMP and JPG. As you've found you could put any of those other image formats into your package. However, the MSI SDK only documents BMP and JPG support.

    0 讨论(0)
  • 2020-12-19 03:06

    As was stated in other answers the image format limitation comes from Microsoft's implementation of MSI, and not from WiX. Although .jpeg seems to be supported starting from Windows 7, and PNG starting from Windows 8, be very careful about the format you use. Your trade-off is the look of your installer.

    My experience showed that the only reliable way to ensure that your resulting installer displays your images correctly is to use uncompressed BMPs. And that is it! Yes, I know they balloon the size of the final file, but, hey, like everything else with Microsoft they are ages behind and there's no way around it.

    So if you don't want to have your installer to display gray squares on Windows XP or Vista instead of your graphics, don't use anything other than raw .bmp format.

    0 讨论(0)
  • 2020-12-19 03:11

    Yes, if you only need to install on Windows 8 or later. From Bitmap Control:

    Windows 8 and Windows Server 2012: The image file can be in any standard format supported by the Windows Imaging Component (WIC), including TIFF, JPEG, PNG, GIF, BMP, and HDPhoto. The control does not support animation.

    0 讨论(0)
提交回复
热议问题