java.lang.Object
org.libheiffx.MappedImageFactory
A factory for creating
BufferedImages backed by memory mapped files.
The data buffers will be allocated outside the normal JVM heap, allowing more
efficient memory usage for large images.- Version:
- $Id: MappedImageFactory.java,v 1.0 May 26, 2010 5:07:01 PM haraldk Exp$
- Author:
- Harald Kuhr, last modified by $Author: haraldk$
-
Method Summary
Modifier and TypeMethodDescriptionstatic BufferedImagecreateCompatibleMappedImage(int width, int height, int type) static BufferedImagecreateCompatibleMappedImage(int width, int height, GraphicsConfiguration configuration, int transparency) static BufferedImagecreateCompatibleMappedImage(int width, int height, ImageTypeSpecifier type) static intReturns theBufferedImageimage type that is compatible with the data inimage.
-
Method Details
-
createCompatibleMappedImage
public static BufferedImage createCompatibleMappedImage(int width, int height, int type) throws IOException - Throws:
IOException
-
createCompatibleMappedImage
public static BufferedImage createCompatibleMappedImage(int width, int height, GraphicsConfiguration configuration, int transparency) throws IOException - Throws:
IOException
-
createCompatibleMappedImage
public static BufferedImage createCompatibleMappedImage(int width, int height, ImageTypeSpecifier type) throws IOException - Throws:
IOException
-
getCompatibleBufferedImageType
Returns the
BufferedImageimage type that is compatible with the data inimage. This method will return compatible types, even ifBufferedImage.getType()returnsBufferedImage.TYPE_CUSTOM.This method is defined to work so that, for any valid
BufferedImagetype (exceptBufferedImage.TYPE_CUSTOM), the following istrue:
getCompatibleBufferedImageType(createCompatibleMappedImage(w, h, type)) == typeIf no standard type is compatible with the image data,
BufferedImage.TYPE_CUSTOMis returned.- Parameters:
image- the image to test, may not benull.- Returns:
- the
BufferedImagetype. - Throws:
IllegalArgumentException- ifimageisnull.- See Also:
-