Class AbstractTiffImageWriter
java.lang.Object
org.apache.commons.imaging.formats.tiff.write.AbstractTiffImageWriter
- Direct Known Subclasses:
TiffImageWriterLossless, TiffImageWriterLossy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidapplyPredictor(int width, int bytesPerSample, byte[] b) private booleanCheck an image to see if any of its pixels are non-opaque.private voidcombineUserExifIntoFinalExif(TiffOutputSet userExif, TiffOutputSet outputSet) private byte[][]getStrips(BufferedImage src, int samplesPerPixel, int bitsPerSample, int rowsPerStrip) protected static intimageDataPaddingLength(int dataLength) protected TiffOutputSummaryvalidateDirectories(TiffOutputSet outputSet) abstract voidwrite(OutputStream os, TiffOutputSet outputSet) voidwriteImage(BufferedImage src, OutputStream os, TiffImagingParameters params) protected voidprotected voidwriteImageFileHeader(AbstractBinaryOutputStream bos, long offsetToFirstIFD)
-
Field Details
-
MAX_PIXELS_FOR_RGB
private static final int MAX_PIXELS_FOR_RGB- See Also:
-
byteOrder
-
-
Constructor Details
-
AbstractTiffImageWriter
public AbstractTiffImageWriter() -
AbstractTiffImageWriter
-
-
Method Details
-
imageDataPaddingLength
protected static int imageDataPaddingLength(int dataLength) -
applyPredictor
private void applyPredictor(int width, int bytesPerSample, byte[] b) -
checkForActualAlpha
Check an image to see if any of its pixels are non-opaque.- Parameters:
src- a valid image- Returns:
- true if at least one non-opaque pixel is found.
-
combineUserExifIntoFinalExif
private void combineUserExifIntoFinalExif(TiffOutputSet userExif, TiffOutputSet outputSet) throws ImagingException - Throws:
ImagingException
-
getStrips
private byte[][] getStrips(BufferedImage src, int samplesPerPixel, int bitsPerSample, int rowsPerStrip) -
validateDirectories
- Throws:
ImagingException
-
write
public abstract void write(OutputStream os, TiffOutputSet outputSet) throws IOException, ImagingException - Throws:
IOExceptionImagingException
-
writeImage
public void writeImage(BufferedImage src, OutputStream os, TiffImagingParameters params) throws ImagingException, IOException - Throws:
ImagingExceptionIOException
-
writeImageFileHeader
- Throws:
IOException
-
writeImageFileHeader
protected void writeImageFileHeader(AbstractBinaryOutputStream bos, long offsetToFirstIFD) throws IOException - Throws:
IOException
-