Class PngWriter
java.lang.Object
org.apache.commons.imaging.formats.png.PngWriter
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate byte[]deflate(byte[] bytes) private bytegetBitDepth(PngColorType pngColorType, Map<String, Object> params) private booleanprivate voidwriteChunk(OutputStream os, ChunkType chunkType, byte[] data) private voidwriteChunkIDAT(OutputStream os, byte[] bytes) private voidprivate voidwriteChunkIHDR(OutputStream os, PngWriter.ImageHeader value) private voidwriteChunkiTXt(OutputStream os, PngText.Itxt text) private voidwriteChunkPHYS(OutputStream os, int xPPU, int yPPU, byte units) private voidwriteChunkPLTE(OutputStream os, Palette palette) private voidwriteChunkSCAL(OutputStream os, double xUPP, double yUPP, byte units) private voidwriteChunktEXt(OutputStream os, PngText.Text text) private voidwriteChunkTRNS(OutputStream os, Palette palette) private voidwriteChunkXmpiTXt(OutputStream os, String xmpXml) private voidwriteChunkzTXt(OutputStream os, PngText.Ztxt text) voidwriteImage(BufferedImage src, OutputStream os, Map<String, Object> params) private voidwriteInt(OutputStream os, int value)
-
Constructor Details
-
PngWriter
PngWriter()
-
-
Method Details
-
writeInt
- Throws:
IOException
-
writeChunk
- Throws:
IOException
-
writeChunkIHDR
- Throws:
IOException
-
writeChunkiTXt
private void writeChunkiTXt(OutputStream os, PngText.Itxt text) throws IOException, ImageWriteException - Throws:
IOExceptionImageWriteException
-
writeChunkzTXt
private void writeChunkzTXt(OutputStream os, PngText.Ztxt text) throws IOException, ImageWriteException - Throws:
IOExceptionImageWriteException
-
writeChunktEXt
private void writeChunktEXt(OutputStream os, PngText.Text text) throws IOException, ImageWriteException - Throws:
IOExceptionImageWriteException
-
deflate
- Throws:
IOException
-
isValidISO_8859_1
-
writeChunkXmpiTXt
- Throws:
IOException
-
writeChunkPLTE
- Throws:
IOException
-
writeChunkTRNS
- Throws:
IOException
-
writeChunkIEND
- Throws:
IOException
-
writeChunkIDAT
- Throws:
IOException
-
writeChunkPHYS
- Throws:
IOException
-
writeChunkSCAL
private void writeChunkSCAL(OutputStream os, double xUPP, double yUPP, byte units) throws IOException - Throws:
IOException
-
getBitDepth
-
writeImage
public void writeImage(BufferedImage src, OutputStream os, Map<String, Object> params) throws ImageWriteException, IOException- Throws:
ImageWriteExceptionIOException
-