[
https://issues.apache.org/jira/browse/IMAGING-330?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bruno P. Kinoshita updated IMAGING-330:
---------------------------------------
Assignee: Bruno P. Kinoshita
> Implement PNG predictors to reduce output size
> ----------------------------------------------
>
> Key: IMAGING-330
> URL: https://issues.apache.org/jira/browse/IMAGING-330
> Project: Commons Imaging
> Issue Type: Improvement
> Components: Format: PNG
> Reporter: Gary Lucas
> Assignee: Bruno P. Kinoshita
> Priority: Major
>
> I propose to enhance the PngWriter class and PngImagingParameters class to
> allow the use of predictors. This change should reduce the size of output
> images written in PNG format. The resulting images will carry exactly the
> same data. There will be no loss of pixels or image quality. But the results
> will be smaller than those currently produced by either Imaging or Java's
> ImageIO class.
> Background
> The PNG specification permits the use of optional predictors as part of its
> data compression logic. Predictors are applied through the use of a filter
> that transforms the data before it is passed to the conventional Deflate data
> compressor. In some cases, predictors can result in a 30 percent reduction
> of file size. They are particularly suited to photographic images. Although
> they will work on graphics and line art, the reduction is often more modest.
> You can find a description of predictors on
> [Wikipedia|https://en.wikipedia.org/wiki/Portable_Network_Graphics#Filtering]
> The Java ImageIO class does not apply predictors as part of its processing.
> Consequently, if you write an image from a Java application using ImageIO,
> pull the image into Paint, and then save it under another name, the size of
> the image may actually decrease. So when this feature is added to Commons
> Imaging, it will out perform ImageIO when writing PNGs.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)