public class BufferedImageWriter extends WriterWrapper
writer| Constructor and Description |
|---|
BufferedImageWriter()
Constructs a BufferedImageWriter around a new image writer.
|
BufferedImageWriter(IFormatWriter r)
Constructs a BufferedImageWriter with the given writer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
static BufferedImageWriter |
makeBufferedImageWriter(IFormatWriter w)
Converts the given writer into a BufferedImageWriter, wrapping if needed.
|
void |
saveImage(BufferedImage image,
boolean last)
Deprecated.
Please use saveImage(int, BufferedImage) instead.
Saves the given BufferedImage to the current file.
Note that this method will append the image plane to the file; it will not
overwrite previously saved image planes.
If this image plane is the last one in the file, the last flag must be set.
|
void |
saveImage(BufferedImage image,
int series,
boolean lastInSeries,
boolean last)
Deprecated.
Please use saveImage(int, BufferedImage) instead.
Saves the given BufferedImage to the given series in the current file.
Note that this method will append the image plane to the file; it will not
overwrite previously saved image planes.
If this image plane is the last one in the series, the lastInSeries flag
must be set.
If this image plane is the last one in the file, the last flag must be set.
|
void |
saveImage(int no,
BufferedImage image)
Saves the given BufferedImage to the current file.
|
void |
saveImage(int no,
BufferedImage image,
int x,
int y,
int w,
int h)
Saves the given BufferedImage to the current file.
|
static byte[] |
toBytes(BufferedImage image,
IFormatWriter writer) |
canDoStacks, changeOutputFile, duplicate, getColorModel, getCompression, getCompressionTypes, getFormat, getFramesPerSecond, getMetadataRetrieve, getNativeDataType, getPixelTypes, getPixelTypes, getSeries, getSuffixes, getWriter, isInterleaved, isSupportedType, isThisType, saveBytes, saveBytes, saveBytes, saveBytes, saveBytes, savePlane, savePlane, savePlane, savePlane, savePlane, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setId, setInterleaved, setMetadataRetrieve, setSeries, setValidBitsPerPixel, setWriteSequentially, unwrap, unwrap, unwrappublic BufferedImageWriter()
public BufferedImageWriter(IFormatWriter r)
public static BufferedImageWriter makeBufferedImageWriter(IFormatWriter w)
public void saveImage(int no,
BufferedImage image)
throws FormatException,
IOException
no - the image index within the current file, starting from 0.image - the BufferedImage to save.FormatExceptionIOExceptionpublic void saveImage(int no,
BufferedImage image,
int x,
int y,
int w,
int h)
throws FormatException,
IOException
no - the image index within the current file, starting from 0.image - the BufferedImage to save.x - the X coordinate of the upper-left corner of the image.y - the Y coordinate of the upper-left corner of the image.w - the width (in pixels) of the image.h - the height (in pixels) of the image.FormatExceptionIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class WriterWrapperIOExceptionpublic void saveImage(BufferedImage image, boolean last) throws FormatException, IOException
FormatExceptionIOExceptionpublic void saveImage(BufferedImage image, int series, boolean lastInSeries, boolean last) throws FormatException, IOException
FormatExceptionIOExceptionpublic static byte[] toBytes(BufferedImage image, IFormatWriter writer)
Copyright © 2014 Open Microscopy Environment