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 |
---|---|
static BufferedImageWriter |
makeBufferedImageWriter(IFormatWriter w)
Converts the given writer into a BufferedImageWriter, wrapping if needed.
|
void |
saveImage(int no,
java.awt.image.BufferedImage image)
Saves the given BufferedImage to the current file.
|
void |
saveImage(int no,
java.awt.image.BufferedImage image,
int x,
int y,
int w,
int h)
Saves the given BufferedImage to the current file.
|
static byte[] |
toBytes(java.awt.image.BufferedImage image,
IFormatWriter writer) |
canDoStacks, changeOutputFile, close, duplicate, getColorModel, getCompression, getCompressionTypes, getFormat, getFramesPerSecond, getMetadataOptions, getMetadataRetrieve, getNativeDataType, getPixelTypes, getPixelTypes, getResolution, getResolutionCount, getResolutions, getSeries, getSuffixes, getSupportedMetadataLevels, getTileSizeX, getTileSizeY, getWriter, isInterleaved, isSupportedType, isThisType, saveBytes, saveBytes, saveBytes, savePlane, savePlane, savePlane, setCodecOptions, setColorModel, setCompression, setFramesPerSecond, setId, setInterleaved, setMetadataOptions, setMetadataRetrieve, setResolution, setResolutions, setSeries, setTileSizeX, setTileSizeY, setValidBitsPerPixel, setWriteSequentially, unwrap, unwrap, unwrap
public BufferedImageWriter()
public BufferedImageWriter(IFormatWriter r)
public static BufferedImageWriter makeBufferedImageWriter(IFormatWriter w)
public void saveImage(int no, java.awt.image.BufferedImage image) throws FormatException, java.io.IOException
no
- the plane index within the series.image
- the BufferedImage to save.FormatException
java.io.IOException
public void saveImage(int no, java.awt.image.BufferedImage image, int x, int y, int w, int h) throws FormatException, java.io.IOException
no
- the plane index within the series.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.FormatException
java.io.IOException
public static byte[] toBytes(java.awt.image.BufferedImage image, IFormatWriter writer)
Copyright © 2023 Open Microscopy Environment