Package org.apache.pdfbox.tools.imageio
Class TIFFUtil
java.lang.Object
org.apache.pdfbox.tools.imageio.TIFFUtil
Used by ImageIOUtil to write TIFF files.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static IIOMetadataNode
createAsciiField
(int number, String name, String val) private static IIOMetadataNode
createLongField
(int number, String name, long val) private static IIOMetadataNode
createRationalField
(int number, String name, int numerator, int denominator) private static IIOMetadataNode
createShortField
(int tiffTagNumber, String name, int val) static void
setCompressionType
(ImageWriteParam param, BufferedImage image) Sets the ImageIO parameter compression type based on the given image.(package private) static void
updateMetadata
(IIOMetadata metadata, 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.
-
Field Details
-
LOG
private static final org.apache.commons.logging.Log LOG
-
-
Constructor Details
-
TIFFUtil
private TIFFUtil()
-
-
Method Details
-
setCompressionType
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(IIOMetadata metadata, BufferedImage image, int dpi) throws IIOInvalidTreeException 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.- Parameters:
image
- buffered image which will be writtenmetadata
- ImageIO metadatadpi
- image dots per inch- Throws:
IIOInvalidTreeException
- if something goes wrong
-
createShortField
-
createAsciiField
-
createLongField
-
createRationalField
private static IIOMetadataNode createRationalField(int number, String name, int numerator, int denominator)
-