PNG crushing built-in?

Hi,

Still hunting for some memory savings and now I tried to run my PNGs through pngcrush.

While the PNG files are notably smaller, the resulting Garmin PRG stays almost the same.

Does Garmin do its own crushing during compilation, and that is why there is no real effect of my own crushing?

Or are the PNGs even part of the PRG?

  • Or are the PNGs even part of the PRG?

    Prior to CIQ 4, the resource compiler would convert all images to uncompressed bitmaps.

    Starting with CIQ 4, you can specify the packingFormat attribute on bitmaps to control the format that's ultimately used in the PRG:

    https://developer.garmin.com/connect-iq/core-topics/resources/

    https://developer.garmin.com/connect-iq/core-topics/resources/#bitmappackingformats

    In your case, I would guess one of three possibilities:

    - you are building for a device with CIQ < 4

    - the resource compiler isn't using png as a packing format

    - even if the resource compiler is using png as a packing format, it's not using your original png (perhaps it converts your image to uncompressed bitmap, then converts it back to png)

    You could always set the packingFormat to png and see if it makes a difference though.

  • Thanks for the info, that is very helpful.

    I am building for older devices as well, for example the Fenix 6 with API 3.4.0.

    So if I understand it correctly, in this case, the resource compiler does not support any of those newer packing formats, takes the PNGs, and converts them to some internal, uncompressed format. Hence crushing the input JPEGs does not make much of a difference.

    I will still try to include the packingFormat so that it can be used for the newer devices.

    Still, have to go hunting for other ways to reduce my PRG. The Fenix 6 has a 32kB limit for the PRG for glances, and I am 3kB short.