Package com.itextpdf.io.codec
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 OutputStream
private static final byte[]
private static final byte[]
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static int
crc
(byte[] buf) private static int
crc
(byte[] buf, int offset, int len) private static void
void
outputInt
(int n) static void
outputInt
(int n, OutputStream s) private static int
update_crc
(int crc, byte[] buf, int offset, int len) void
writeChunk
(byte[] chunkType, byte[] data) void
writeData
(byte[] data, int stride) void
writeEnd()
void
writeHeader
(int width, int height, int bitDepth, int colorType) void
writeIccProfile
(byte[] data) void
writePalette
(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
-