public class ImageModels
extends java.lang.Object
ImageModel instances| Modifier and Type | Method and Description |
|---|---|
static DefaultImageModel |
create(java.lang.String inputUri,
java.lang.String uri)
Creates a new
ImageModel with the given URI, that contains
a buffer containing the image data that was read from the given
source URI. |
static DefaultImageModel |
create(java.lang.String uri,
java.lang.String mimeType,
PixelData pixelData)
Creates a new
ImageModel with the given URI, that contains
a buffer containing the image data for the given PixelData,
encoded with the given MIME type. |
static DefaultImageModel |
create(java.lang.String fileName,
java.lang.String uri,
java.lang.String mimeType)
Creates a new
ImageModel with the given URI, that contains
a buffer containing the image data that was read from the given
source file, encoded with the given MIME type. |
public static DefaultImageModel create(java.lang.String fileName, java.lang.String uri, java.lang.String mimeType)
ImageModel with the given URI, that contains
a buffer containing the image data that was read from the given
source file, encoded with the given MIME type."image/png" or
"image/gif" or "image/jpeg" (not
"image/jpg"!).null is returned.fileName - The source file nameuri - The URI that will be assigned to the ImageModelmimeType - The MIME typejava.lang.IllegalArgumentException - If the MIME type is not one of the
types listed abovepublic static DefaultImageModel create(java.lang.String uri, java.lang.String mimeType, PixelData pixelData)
ImageModel with the given URI, that contains
a buffer containing the image data for the given PixelData,
encoded with the given MIME type."image/png" or
"image/gif" or "image/jpeg" (not
"image/jpg"!).uri - The URI that will be assigned to the ImageModelmimeType - The MIME typepixelData - The PixelDatajava.lang.IllegalArgumentException - If the MIME type is not one of the
types listed abovepublic static DefaultImageModel create(java.lang.String inputUri, java.lang.String uri)
ImageModel with the given URI, that contains
a buffer containing the image data that was read from the given
source URI.null is returned.
null is returned. If the source URI
is not absolute, it will be assumed to be a path description
that is resolved against the default file system.inputUri - The source file nameuri - The URI that will be assigned to the ImageModelCopyright © 2022. All Rights Reserved.