public class ImageLoaderFactoryRaw extends AbstractImageLoaderFactory
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MIME_EMF
MIME type for EMF (Windows Enhanced Metafile)
|
Constructor and Description |
---|
ImageLoaderFactoryRaw() |
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getMimeForRawFlavor(ImageFlavor flavor)
Returns the MIME type for a given ImageFlavor if it is from a format that is consumed
without being undecoded.
|
ImageFlavor[] |
getSupportedFlavors(java.lang.String mime)
Returns an array of ImageFlavors that are supported by this implementation for a given
MIME type.
|
java.lang.String[] |
getSupportedMIMETypes()
Returns an array of MIME types supported by this implementation.
|
boolean |
isAvailable()
Indicates whether the underlying libraries needed by the implementation are available.
|
boolean |
isSupported(ImageInfo imageInfo)
Indicates whether the given image (represented by an
ImageInfo object) is supported
by the loader. |
ImageLoader |
newImageLoader(ImageFlavor targetFlavor)
Creates and returns a new ImageLoader instance.
|
getUsagePenalty
public static final java.lang.String MIME_EMF
public static java.lang.String getMimeForRawFlavor(ImageFlavor flavor)
flavor
- the image flavorpublic java.lang.String[] getSupportedMIMETypes()
public ImageFlavor[] getSupportedFlavors(java.lang.String mime)
mime
- the MIME typepublic ImageLoader newImageLoader(ImageFlavor targetFlavor)
targetFlavor
- the target image flavor to producepublic boolean isAvailable()
public boolean isSupported(ImageInfo imageInfo)
AbstractImageLoaderFactory
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.isSupported
in interface ImageLoaderFactory
isSupported
in class AbstractImageLoaderFactory
imageInfo
- the image info objectCopyright 1999-2025 The Apache Software Foundation. All Rights Reserved.