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 byte
getBitDepth
(PngColorType pngColorType, Map<String, Object> params) private boolean
private void
writeChunk
(OutputStream os, ChunkType chunkType, byte[] data) private void
writeChunkIDAT
(OutputStream os, byte[] bytes) private void
private void
writeChunkIHDR
(OutputStream os, PngWriter.ImageHeader value) private void
writeChunkiTXt
(OutputStream os, PngText.Itxt text) private void
writeChunkPHYS
(OutputStream os, int xPPU, int yPPU, byte units) private void
writeChunkPLTE
(OutputStream os, Palette palette) private void
writeChunkSCAL
(OutputStream os, double xUPP, double yUPP, byte units) private void
writeChunktEXt
(OutputStream os, PngText.Text text) private void
writeChunkTRNS
(OutputStream os, Palette palette) private void
writeChunkXmpiTXt
(OutputStream os, String xmpXml) private void
writeChunkzTXt
(OutputStream os, PngText.Ztxt text) void
writeImage
(BufferedImage src, OutputStream os, Map<String, Object> params) private void
writeInt
(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:
IOException
ImageWriteException
-
writeChunkzTXt
private void writeChunkzTXt(OutputStream os, PngText.Ztxt text) throws IOException, ImageWriteException - Throws:
IOException
ImageWriteException
-
writeChunktEXt
private void writeChunktEXt(OutputStream os, PngText.Text text) throws IOException, ImageWriteException - Throws:
IOException
ImageWriteException
-
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:
ImageWriteException
IOException
-