Class PngWriter
java.lang.Object
com.itextpdf.io.codec.PngWriter
Writes a PNG image.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static int[]private static final byte[]private static final byte[]private static final byte[]private static final byte[]private OutputStreamprivate static final byte[]private static final byte[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static intcrc(byte[] buf) private static intcrc(byte[] buf, int offset, int len) private static voidvoidoutputInt(int n) static voidoutputInt(int n, OutputStream s) private static intupdate_crc(int crc, byte[] buf, int offset, int len) voidwriteChunk(byte[] chunkType, byte[] data) voidwriteData(byte[] data, int stride) voidwriteEnd()voidwriteHeader(int width, int height, int bitDepth, int colorType) voidwriteIccProfile(byte[] data) voidwritePalette(byte[] data)
-
Field Details
-
PNG_SIGNTURE
private static final byte[] PNG_SIGNTURE -
IHDR
private static final byte[] IHDR -
PLTE
private static final byte[] PLTE -
IDAT
private static final byte[] IDAT -
IEND
private static final byte[] IEND -
iCCP
private static final byte[] iCCP -
crc_table
private static int[] crc_table -
outp
-
-
Constructor Details
-
PngWriter
- Throws:
IOException
-
-
Method Details
-
writeHeader
- Throws:
IOException
-
writeEnd
- Throws:
IOException
-
writeData
- Throws:
IOException
-
writePalette
- Throws:
IOException
-
writeIccProfile
- Throws:
IOException
-
make_crc_table
private static void make_crc_table() -
update_crc
private static int update_crc(int crc, byte[] buf, int offset, int len) -
crc
private static int crc(byte[] buf, int offset, int len) -
crc
private static int crc(byte[] buf) -
outputInt
- Throws:
IOException
-
outputInt
- Throws:
IOException
-
writeChunk
- Throws:
IOException
-