Class ImageLoaderFactoryRawCCITTFax

java.lang.Object
org.apache.xmlgraphics.image.loader.impl.AbstractImageLoaderFactory
org.apache.xmlgraphics.image.loader.impl.ImageLoaderFactoryRawCCITTFax
All Implemented Interfaces:
ImageLoaderFactory

public class ImageLoaderFactoryRawCCITTFax extends AbstractImageLoaderFactory
Factory class for the ImageLoader for raw/undecoded CCITT encoded images.
  • Constructor Details

    • ImageLoaderFactoryRawCCITTFax

      public ImageLoaderFactoryRawCCITTFax()
  • Method Details

    • getMimeForRawFlavor

      public static String getMimeForRawFlavor(ImageFlavor flavor)
      Returns the MIME type for a given ImageFlavor if it is from a format that is consumed without being undecoded. If the ImageFlavor is no raw flavor, an IllegalArgumentException is thrown.
      Parameters:
      flavor - the image flavor
      Returns:
      the associated MIME type
    • getSupportedMIMETypes

      public String[] getSupportedMIMETypes()
      Returns an array of MIME types supported by this implementation.
      Returns:
      the MIME type array
    • getSupportedFlavors

      public ImageFlavor[] getSupportedFlavors(String mime)
      Returns an array of ImageFlavors that are supported by this implementation for a given MIME type.
      Parameters:
      mime - the MIME type
      Returns:
      the ImageFlavor array
    • newImageLoader

      public ImageLoader newImageLoader(ImageFlavor targetFlavor)
      Creates and returns a new ImageLoader instance.
      Parameters:
      targetFlavor - the target image flavor to produce
      Returns:
      a new ImageLoader instance
    • isAvailable

      public boolean isAvailable()
      Indicates whether the underlying libraries needed by the implementation are available.
      Returns:
      true if the implementation is functional.
    • isSupported

      public boolean isSupported(ImageInfo imageInfo)
      Indicates whether the given image (represented by an ImageInfo object) is supported by the loader. By default, implementations return true assuming all images of the supported MIME types can be processed correctly. In some cases, however, an ImageLoader may only support a subset of a format because it offers an optimized way to embed the image in the target format (for example: CCITT compressed TIFF files in PDF and PostScript). For this to work, the preloader must register some information in the ImageInfo's custom objects so the factory can identify if an image may or may not be supported.
      Specified by:
      isSupported in interface ImageLoaderFactory
      Overrides:
      isSupported in class AbstractImageLoaderFactory
      Parameters:
      imageInfo - the image info object
      Returns:
      true if the image is supported by the loaders generated by this factory