[ 
https://issues.apache.org/jira/browse/IMAGING-126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14272512#comment-14272512
 ] 

Benedikt Ritter commented on IMAGING-126:
-----------------------------------------

I've applied your patch. You should try not to add unrelated changes (there 
where a few white spaces changes, probably due to IDE settings) because this 
make reviewing harder. Further more, it is better to use 
{{Integer.valueOf(int)}} instead of {{new Integer(int)}} because the first will 
reuse already created integer instances.

{code:java}
$ svn ci -m "IMAGING-126: TIFF and PNG images should not be bigger than the 
ones created by java ImageIO. Thanks to Gary Lucas."
Sending        src/changes/changes.xml
Sending        
src/main/java/org/apache/commons/imaging/formats/tiff/constants/TiffConstants.java
Sending        
src/main/java/org/apache/commons/imaging/formats/tiff/write/TiffImageWriterBase.java
Transmitting file data ...
Committed revision 1650744.
{code}

Thanks!

> TIFF and PNG images should not be bigger than the ones created by java ImageIO
> ------------------------------------------------------------------------------
>
>                 Key: IMAGING-126
>                 URL: https://issues.apache.org/jira/browse/IMAGING-126
>             Project: Commons Imaging
>          Issue Type: Improvement
>          Components: Format: PNG, Format: TIFF
>    Affects Versions: 1.0
>         Environment: W7
>            Reporter: Tilman Hausherr
>            Priority: Minor
>             Fix For: Review Patch
>
>         Attachments: Imaging_126_patch_2014_12_30.patch, 
> pdfbox-1870-devicen3-01.png, pdfbox-1870-devicen3-01.tif, 
> pdfbox-1870-devicen3.pdf-1.png, pdfbox-1870-devicen3.pdf-1.tif
>
>
> I tried to use Apache Imaging for the PDFBOX project (PDFBOX-1734) because of 
> problems with setting the tiff resolution in java imageio.
> While the code is pretty nice, I found that the generated images are 
> sometimes much bigger in size than the ones generated by java imageio.
> Example:
> pdfbox-1870-devicen3-01.png 50 KB (imageio)
> pdfbox-1870-devicen3.pdf-1.png 70 KB (imaging)
> pdfbox-1870-devicen3-01.tif 401 KB (imageio)
> pdfbox-1870-devicen3.pdf-1.tif 1063 KB (imaging)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to