public class PNMImageWriter extends ImageWriter
ImageWriteParam
.PNMImageWriteParam
Modifier and Type | Field and Description |
---|---|
private static String |
COMMENT |
private static byte[] |
lineSeparator |
private int |
maxValue |
private static int |
PBM_ASCII |
private static int |
PBM_RAW |
private static int |
PGM_ASCII |
private static int |
PGM_RAW |
private static int |
PPM_ASCII |
private static int |
PPM_RAW |
private static int |
SPACE |
private ImageOutputStream |
stream
The output stream to write into
|
private int |
variant |
availableLocales, locale, originatingProvider, output, progressListeners, warningListeners, warningLocales
Constructor and Description |
---|
PNMImageWriter(ImageWriterSpi originator)
Constructs
PNMImageWriter based on the provided
ImageWriterSpi . |
Modifier and Type | Method and Description |
---|---|
boolean |
canWriteRasters() |
IIOMetadata |
convertImageMetadata(IIOMetadata inData,
ImageTypeSpecifier imageType,
ImageWriteParam param) |
IIOMetadata |
convertStreamMetadata(IIOMetadata inData,
ImageWriteParam param) |
IIOMetadata |
getDefaultImageMetadata(ImageTypeSpecifier imageType,
ImageWriteParam param) |
IIOMetadata |
getDefaultStreamMetadata(ImageWriteParam param) |
ImageWriteParam |
getDefaultWriteParam() |
private boolean |
isRaw(int v)
Returns true if file variant is raw format, false if ASCII.
|
void |
reset() |
void |
setOutput(Object output) |
void |
write(IIOMetadata streamMetadata,
IIOImage image,
ImageWriteParam param) |
private void |
writeByte(ImageOutputStream output,
byte b)
Writes a byte to the output in ASCII format.
|
private void |
writeInteger(ImageOutputStream output,
int i)
Writes an integer to the output in ASCII format.
|
abort, abortRequested, addIIOWriteProgressListener, addIIOWriteWarningListener, canInsertEmpty, canInsertImage, canRemoveImage, canReplaceImageMetadata, canReplacePixels, canReplaceStreamMetadata, canWriteEmpty, canWriteSequence, clearAbortRequest, dispose, endInsertEmpty, endReplacePixels, endWriteEmpty, endWriteSequence, getAvailableLocales, getLocale, getNumThumbnailsSupported, getOriginatingProvider, getOutput, getPreferredThumbnailSizes, prepareInsertEmpty, prepareReplacePixels, prepareWriteEmpty, prepareWriteSequence, processImageComplete, processImageProgress, processImageStarted, processThumbnailComplete, processThumbnailProgress, processThumbnailStarted, processWarningOccurred, processWarningOccurred, processWriteAborted, removeAllIIOWriteProgressListeners, removeAllIIOWriteWarningListeners, removeIIOWriteProgressListener, removeIIOWriteWarningListener, removeImage, replaceImageMetadata, replacePixels, replacePixels, replaceStreamMetadata, setLocale, write, write, writeInsert, writeToSequence
private static final int PBM_ASCII
private static final int PGM_ASCII
private static final int PPM_ASCII
private static final int PBM_RAW
private static final int PGM_RAW
private static final int PPM_RAW
private static final int SPACE
private static final String COMMENT
private static byte[] lineSeparator
private int variant
private int maxValue
private ImageOutputStream stream
public PNMImageWriter(ImageWriterSpi originator)
PNMImageWriter
based on the provided
ImageWriterSpi
.public void setOutput(Object output)
setOutput
in class ImageWriter
public ImageWriteParam getDefaultWriteParam()
getDefaultWriteParam
in class ImageWriter
public IIOMetadata getDefaultStreamMetadata(ImageWriteParam param)
getDefaultStreamMetadata
in class ImageWriter
public IIOMetadata getDefaultImageMetadata(ImageTypeSpecifier imageType, ImageWriteParam param)
getDefaultImageMetadata
in class ImageWriter
public IIOMetadata convertStreamMetadata(IIOMetadata inData, ImageWriteParam param)
convertStreamMetadata
in interface ImageTranscoder
convertStreamMetadata
in class ImageWriter
public IIOMetadata convertImageMetadata(IIOMetadata inData, ImageTypeSpecifier imageType, ImageWriteParam param)
convertImageMetadata
in interface ImageTranscoder
convertImageMetadata
in class ImageWriter
public boolean canWriteRasters()
canWriteRasters
in class ImageWriter
public void write(IIOMetadata streamMetadata, IIOImage image, ImageWriteParam param) throws IOException
write
in class ImageWriter
IOException
public void reset()
reset
in class ImageWriter
private void writeInteger(ImageOutputStream output, int i) throws IOException
IOException
private void writeByte(ImageOutputStream output, byte b) throws IOException
IOException
private boolean isRaw(int v)
Copyright © 2016 Open Microscopy Environment