true
if the ImageWriter
implementation associated with this service provider is able to encode an image with the given layout. The layout (i.e., the image's SampleModel
and ColorModel
) is described by an ImageTypeSpecifier
object. A return value of true
is not an absolute guarantee of successful encoding; the encoding process may still produce errors due to factors such as I/O errors, inconsistent or malformed data structures, etc. The intent is that a reasonable inspection of the basic structure of the image be performed in order to determine if it is within the scope of the encoding format. For example, a service provider for a format that can only encode greyscale would return false
if handed an RGB BufferedImage
. Similarly, a service provider for a format that can encode 8-bit RGB imagery might refuse to encode an image with an associated alpha channel.
Different ImageWriter
s, and thus service providers, may choose to be more or less strict. For example, they might accept an image with premultiplied alpha even though it will have to be divided out of each pixel, at some loss of precision, in order to be stored.
@param type an ImageTypeSpecifier
specifying thelayout of the image to be written.
@return true
if this writer is likely to be ableto encode images with the given layout.
@exception IllegalArgumentException if type
is null
.
|
|
|
|