Class AbstractImageLoader
java.lang.Object
org.apache.xmlgraphics.image.loader.impl.AbstractImageLoader
- All Implemented Interfaces:
ImageLoader
- Direct Known Subclasses:
CompositeImageLoader, ImageLoaderEPS, ImageLoaderImageIO, ImageLoaderInternalTIFF, ImageLoaderPNG, ImageLoaderRaw, ImageLoaderRawCCITTFax, ImageLoaderRawJPEG, ImageLoaderRawPNG
Simple abstract base class for ImageLoaders.
-
Field Summary
Fields inherited from interface ImageLoader
MEDIUM_LOADING_PENALTY, NO_LOADING_PENALTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the penalty assigned to using this image loader.protected booleanignoreColorProfile(Map<String, Object> hints) Indicates whether an embedded color profile should be ignored.loadImage(ImageInfo info, ImageSessionContext session) Loads and returns an image.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ImageLoader
getTargetFlavor, loadImage
-
Constructor Details
-
AbstractImageLoader
public AbstractImageLoader()
-
-
Method Details
-
loadImage
public Image loadImage(ImageInfo info, ImageSessionContext session) throws ImageException, IOException Loads and returns an image.- Specified by:
loadImagein interfaceImageLoader- Parameters:
info- the image info object indicating the imagesession- the session context- Returns:
- the fully loaded image
- Throws:
ImageException- if an error occurs while loading the imageIOException- if an I/O error occurs while loading the image
-
getUsagePenalty
public int getUsagePenalty()Returns the penalty assigned to using this image loader. The value is used to select the best processing chain for images.- Specified by:
getUsagePenaltyin interfaceImageLoader- Returns:
- the usage penalty (must be a non-negative integer)
-
ignoreColorProfile
-