xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50657] New: [PATCH] ImageIO adds Inch Resolution Unit, X and Y res, and Rows per Strip
Date Wed, 26 Jan 2011 05:54:59 GMT

           Summary: [PATCH] ImageIO adds Inch Resolution Unit, X and Y
                    res, and Rows per Strip
           Product: XMLGraphicsCommons
           Version: Trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: ImageWriter
        AssignedTo: general@xmlgraphics.apache.org
        ReportedBy: joshua.marquart@firstdata.com

Created an attachment (id=26551)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=26551)
Patch file for inch res unit and rows per strip changes to xmlgraphicscommons

1) Added more variables to ImageWriterParams to support following changes. 
Propose future evaluation to extend class to mime-specific (TIFF, JPEG)
implementations as too many private variables are mime-specific (even prior to
this change).

2) Separated single resolution into X and Y, as unequal values is definitely
possible with TIFF (consider the 196 x 204 standard for faxing); xResolution
becomes container for standard single resolution.  setResolution will set both
x and y values equally; getResolution will now return xResolution.

3) Added resolution unit (to allow for inches and none); still defaults to

4) Added rowsPerStrip which at this time may be 1 (default) or pixel height of
current image.

5) Added rowsPerStripOverridden boolean which is evaluated to sets height of
current page as value of rowsPerStrip for TIFF.

1) Replaced updateMetadata(IIOMetaData, ImageWriterParams) with
updateMetadata(RenderedImage, IIOMetaData, ImageWriterParams);
Wanted to leave original in for backwards compatibility, but could not
determine a way to do so without breaking.  This is the biggest change and will
cause controversy with any classes which extend the current version of
ImageIOImageWriter.  As far as I can tell, updateMetadata of ImageIOImageWriter
is only used by Tiff, not by PNG or JPEG and should probably just be moved to

The reason for the replacement was to allow the height of the current
RenderedImage to be used for RowsPerStrip 

2) Altered updateMetadata to account for non-centimeter resolution unit; cm is
still default.

1) Added new constants as I could not find a more appropriate class.

1) Applied TIFFImageDecoder constants judiciously.  I understand we don't
reference BaselineTIFFTagSet to reduce required libraries on compilation, but
since these classes require imageio anyway, I recommend we reconsider rather
than duplicate code.

2) Added set of Resolution Unit in metadata; calculation performed correctly
for Inch and maintained for Centimeter (default).

2.5) Removed existing code for Resolution Unit - after evaluation, it was
determined this code did absolutely nothing.

3) Added option to override RowsPerStrip with the height of the currently
rendered image; this correctly reduces the size of the metadata, which is
currently immense in comparison, and time to create file.

4) Created utility methods and cleaned up existing.

1) Accounted for separate X and Y resolutions

2) Accounted for resolution unit (cm (3) is default)

Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: general-help@xmlgraphics.apache.org

View raw message