xmlgraphics-commons 2.0.1

org.apache.xmlgraphics.image.writer.imageio
Class ImageIOTIFFImageWriter

java.lang.Object
  extended by org.apache.xmlgraphics.image.writer.imageio.ImageIOImageWriter
      extended by org.apache.xmlgraphics.image.writer.imageio.ImageIOTIFFImageWriter
All Implemented Interfaces:
EventListener, IIOWriteWarningListener, ImageWriter

public class ImageIOTIFFImageWriter
extends ImageIOImageWriter

ImageWriter that encodes TIFF images using Image I/O.

Version:
$Id: ImageIOTIFFImageWriter.java 1576437 2014-03-11 17:49:35Z vhennebert $

Constructor Summary
ImageIOTIFFImageWriter()
          Main constructor.
 
Method Summary
static IIOMetadataNode createMetadataField(int number, String name)
          Utility function to create a base TIFFField node for TIFF metadata.
static IIOMetadataNode createRationalMetadataNode(int number, String name, String value)
          Utility to create a TIFFRational metadata child node of a TIFFRationals node for TIFF metadata.
static IIOMetadataNode createShortMetadataNode(int number, String name, String value)
          Utility to create a TIFFShort metadata child node of a TIFFShorts node for TIFF metadata.
static IIOMetadataNode createShortMetadataNode(int number, String name, String value, String description)
          Utility to create a TIFFShort metadata child node of a TIFFShorts node for TIFF metadata.
protected  IIOMetadata createStreamMetadata(ImageWriter writer, ImageWriteParam writeParam, ImageWriterParams params)
          Creates the stream metadata for image.
protected  IIOMetadata updateMetadata(RenderedImage image, IIOMetadata meta, ImageWriterParams params)
          Updates the metadata information based on the parameters to this writer.
 
Methods inherited from class org.apache.xmlgraphics.image.writer.imageio.ImageIOImageWriter
createMultiImageWriter, getChildNode, getDefaultWriteParam, getMIMEType, isFunctional, supportsMultiImageWriter, warningOccurred, writeImage, writeImage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageIOTIFFImageWriter

public ImageIOTIFFImageWriter()
Main constructor.

Method Detail

updateMetadata

protected IIOMetadata updateMetadata(RenderedImage image,
                                     IIOMetadata meta,
                                     ImageWriterParams params)
Updates the metadata information based on the parameters to this writer.

Overrides:
updateMetadata in class ImageIOImageWriter
Parameters:
image - the current image being rendered
meta - the metadata
params - the parameters
Returns:
the updated metadata

createShortMetadataNode

public static final IIOMetadataNode createShortMetadataNode(int number,
                                                            String name,
                                                            String value)
Utility to create a TIFFShort metadata child node of a TIFFShorts node for TIFF metadata.

Parameters:
number - value of the number attribute of the TIFField
name - value of the name attribute of the TIFFField
value - value of the value attribute of the TIFFShort
Returns:
the new metadata node

createShortMetadataNode

public static final IIOMetadataNode createShortMetadataNode(int number,
                                                            String name,
                                                            String value,
                                                            String description)
Utility to create a TIFFShort metadata child node of a TIFFShorts node for TIFF metadata.

Parameters:
number - value of the number attribute of the TIFField
name - value of the name attribute of the TIFFField
value - value of the value attribute of the TIFFShort
description - value of the description attribute of the TIFFShort, ignored if null
Returns:
the new metadata node

createRationalMetadataNode

public static final IIOMetadataNode createRationalMetadataNode(int number,
                                                               String name,
                                                               String value)
Utility to create a TIFFRational metadata child node of a TIFFRationals node for TIFF metadata.

Parameters:
number - value of the number attribute of the TIFField
name - value of the name attribute of the TIFFField
value - value of the value attribute of the TIFFRational
Returns:
the new metadata node

createMetadataField

public static final IIOMetadataNode createMetadataField(int number,
                                                        String name)
Utility function to create a base TIFFField node for TIFF metadata.

Parameters:
number - value of the number attribute of the TIFField
name - value of the name attribute of the TIFFField
Returns:
the new metadata node

createStreamMetadata

protected IIOMetadata createStreamMetadata(ImageWriter writer,
                                           ImageWriteParam writeParam,
                                           ImageWriterParams params)
Creates the stream metadata for image. By default, this method returns null which causes the default stream metadata to be used. Subclasses can override this to supply special stream metadata (see TIFF for an example).

Overrides:
createStreamMetadata in class ImageIOImageWriter
Parameters:
writer - the image write
writeParam - the ImageIO write parameters
params - the ImageWriter write parameters
Returns:
the stream metadata (or null if no special metadata needs to be produced)

xmlgraphics-commons 2.0.1

Copyright 1999-2015 The Apache Software Foundation. All Rights Reserved.