Interface ImageWriter
- All Known Implementing Classes:
AbstractImageWriter
,ImageIOImageWriter
,ImageIOJPEGImageWriter
,ImageIOPNGImageWriter
,ImageIOTIFFImageWriter
,PNGImageWriter
,TIFFImageWriter
public interface ImageWriter
Interface which allows image library independent image writing.
- Version:
- $Id$
-
Method Summary
Modifier and TypeMethodDescriptionCreates a MultiImageWriter instance that lets you put multiple pages into a single file if the format supports it.boolean
boolean
void
writeImage
(RenderedImage image, OutputStream out) Encodes an image and writes it to an OutputStream.void
writeImage
(RenderedImage image, OutputStream out, ImageWriterParams params) Encodes an image and writes it to an OutputStream.
-
Method Details
-
writeImage
Encodes an image and writes it to an OutputStream.- Parameters:
image
- the image to be encodedout
- the OutputStream to write to- Throws:
IOException
- In case of an /IO problem
-
writeImage
Encodes an image and writes it to an OutputStream.- Parameters:
image
- the image to be encodedout
- the OutputStream to write toparams
- a parameters object to customize the encoding.- Throws:
IOException
- In case of an /IO problem
-
getMIMEType
String getMIMEType()- Returns:
- the target MIME type supported by this ImageWriter
-
isFunctional
boolean isFunctional()- Returns:
- true if the ImageWriter is expected to work properly in the current environment
-
supportsMultiImageWriter
boolean supportsMultiImageWriter()- Returns:
- true if the implemented format supports multiple pages in a single file
-
createMultiImageWriter
Creates a MultiImageWriter instance that lets you put multiple pages into a single file if the format supports it.- Parameters:
out
- the OutputStream to write the image to- Returns:
- the requested MultiImageWriter instance
- Throws:
IOException
- In case of an /IO problem
-