Package org.apache.pdfbox.tools.imageio
Class TIFFUtil
- java.lang.Object
-
- org.apache.pdfbox.tools.imageio.TIFFUtil
-
final class TIFFUtil extends java.lang.ObjectUsed by ImageIOUtil to write TIFF files.
-
-
Field Summary
Fields Modifier and Type Field Description private static org.apache.commons.logging.LogLOG
-
Constructor Summary
Constructors Modifier Constructor Description privateTIFFUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static javax.imageio.metadata.IIOMetadataNodecreateAsciiField(int number, java.lang.String name, java.lang.String val)private static javax.imageio.metadata.IIOMetadataNodecreateLongField(int number, java.lang.String name, long val)private static javax.imageio.metadata.IIOMetadataNodecreateRationalField(int number, java.lang.String name, int numerator, int denominator)private static javax.imageio.metadata.IIOMetadataNodecreateShortField(int tiffTagNumber, java.lang.String name, int val)static voidsetCompressionType(javax.imageio.ImageWriteParam param, java.awt.image.BufferedImage image)Sets the ImageIO parameter compression type based on the given image.(package private) static voidupdateMetadata(javax.imageio.metadata.IIOMetadata metadata, java.awt.image.BufferedImage image, int dpi)Updates the given ImageIO metadata with Sun's custom TIFF tags, as described in the org.apache.xmlgraphics.image.writer.imageio.ImageIOTIFFImageWriter sources, the com.sun.media.imageio.plugins.tiff package javadoc and the TIFF specification.
-
-
-
Method Detail
-
setCompressionType
public static void setCompressionType(javax.imageio.ImageWriteParam param, java.awt.image.BufferedImage image)Sets the ImageIO parameter compression type based on the given image.- Parameters:
image- buffered image used to decide compression typeparam- ImageIO write parameter to update
-
updateMetadata
static void updateMetadata(javax.imageio.metadata.IIOMetadata metadata, java.awt.image.BufferedImage image, int dpi) throws javax.imageio.metadata.IIOInvalidTreeExceptionUpdates the given ImageIO metadata with Sun's custom TIFF tags, as described in the org.apache.xmlgraphics.image.writer.imageio.ImageIOTIFFImageWriter sources, the com.sun.media.imageio.plugins.tiff package javadoc and the TIFF specification.- Parameters:
image- buffered image which will be writtenmetadata- ImageIO metadatadpi- image dots per inch- Throws:
javax.imageio.metadata.IIOInvalidTreeException- if something goes wrong
-
createShortField
private static javax.imageio.metadata.IIOMetadataNode createShortField(int tiffTagNumber, java.lang.String name, int val)
-
createAsciiField
private static javax.imageio.metadata.IIOMetadataNode createAsciiField(int number, java.lang.String name, java.lang.String val)
-
createLongField
private static javax.imageio.metadata.IIOMetadataNode createLongField(int number, java.lang.String name, long val)
-
createRationalField
private static javax.imageio.metadata.IIOMetadataNode createRationalField(int number, java.lang.String name, int numerator, int denominator)
-
-