Knowledge Base
C081201 - Creating lossy PNG files
Products:
Express Server 6.1.1 and laterSummary:
You’d like to use PNG as a delivery format but its default lossless encoding makes the files too large.
Cause:
The PNG format is useful because among other things it supports the use of transparency values. Using PNG images, client applications can take advantage of image transparency to composite layers in a GIS. In fact, some clients request a transparency-supporting format such as PNG first. But PNG images are encoded with lossless compression and can therefore be very large.
Solution:
Palettizing an image before encoding it as PNG reduces its size by reducing the number of colors in the image to 256. It also results in lower image quality by introducing lossiness prior to compression.
To have Express Server palettize an image for delivery, use the special catalog property “iserv-palettize-png”. Including this property with a value of “true” in the catalog configuration file (cat-cfg.xml) enables the palettization of PNG files on output. Palettization affects only PNG files. By default this property is not enabled.
Include the property with the other name-value pairs in your cat-cfg.xml file as follows:
| Code: |
| <Property name=”iserv-palettize-png” value=”true” / |
Note: This property defers to the pct parameter in the getimage command of the Web API.
Reference Number:
FB- 6090This article was last updated or verified on 4 August 2012.
