[
https://issues.apache.org/jira/browse/IMAGING-218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16704272#comment-16704272
]
Shukant Kumar Pal commented on IMAGING-218:
-------------------------------------------
I have done a pull request, check it out -
[https://github.com/apache/commons-imaging/pull/38.] If you like it, I will
fully clean the PNG component.
I have created the ChunkLoader (formats.png.chunk.ChunkLoader) to offload the
chunk loading processĀ from PngImageParser.
Also, I have removed PngWriter.ImageHeader and made PngChunkIhdr mutable. This
allows creating a PngChunkIhdr with all the required fields, instead of
creating the duplicate ImageHeader while creating a PNG image file.
> PNG package code bloated
> ------------------------
>
> Key: IMAGING-218
> URL: https://issues.apache.org/jira/browse/IMAGING-218
> Project: Commons Imaging
> Issue Type: Bug
> Components: Format: PNG
> Affects Versions: 1.x
> Reporter: Shukant Kumar Pal
> Priority: Major
> Fix For: 1.x
>
>
> The PNG component is really really bloated, and code is written for the same
> thing twice sometimes. For example, the formats.png package uses the
> `PngWriter` class which internally replicates the features that should
> actually be contained within formats.png.chunk Chunk classes (like
> PngWriter.ImageHeader which is just a PNG chunk representation, and can be
> eliminated by modified Chunk and PngChunkIhdr).
> The file format classes can be modified to reduce the code size significantly
> and make it much more clear. I'll clean up the PNG code, but want the
> interest of the project members.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)