Class TIFFTranscoder

All Implemented Interfaces:
Transcoder

public class TIFFTranscoder extends ImageTranscoder
This class is an ImageTranscoder that produces a TIFF image.
  • Field Details

    • KEY_FORCE_TRANSPARENT_WHITE

      public static final TranscodingHints.Key KEY_FORCE_TRANSPARENT_WHITE
      The forceTransparentWhite key.
      Key: KEY_FORCE_TRANSPARENT_WHITE
      Value: Boolean
      Default: false
      Required: No
      Description: It controls whether the encoder should force the image's fully transparent pixels to be fully transparent white instead of fully transparent black. This is useful when the encoded TIFF is displayed in a viewer which does not support TIFF transparency and lets the image display with a white background instead of a black background.
      However, note that the modified image will display differently over a white background in a viewer that supports transparency.
    • KEY_COMPRESSION_METHOD

      public static final TranscodingHints.Key KEY_COMPRESSION_METHOD
      The compression method for the image.
      Key: KEY_COMPRESSION_METHOD
      Value: String ("none", "packbits", "jpeg" etc.)
      Default: "none" (no compression)
      Required: Recommended
      Description: Specify the compression method used to encode the image.
  • Constructor Details

    • TIFFTranscoder

      public TIFFTranscoder()
      Constructs a new transcoder that produces tiff images.
  • Method Details

    • getUserAgent

      public UserAgent getUserAgent()
      Returns:
      the transcoder's user agent
    • createImage

      public BufferedImage createImage(int width, int height)
      Creates a new ARGB image with the specified dimension.
      Specified by:
      createImage in class ImageTranscoder
      Parameters:
      width - the image width in pixels
      height - the image height in pixels
    • writeImage

      public void writeImage(BufferedImage img, TranscoderOutput output) throws TranscoderException
      Writes the specified image to the specified output.
      Specified by:
      writeImage in class ImageTranscoder
      Parameters:
      img - the image to write
      output - the output where to store the image
      Throws:
      TranscoderException - if an error occured while storing the image