com.lowagie.text.pdf.codec
public class PngImage extends Object
It is based in part in the JAI codec.
| Nested Class Summary | |
|---|---|
| static class | PngImage.NewByteArrayOutputStream |
| Field Summary | |
|---|---|
| PdfDictionary | additional |
| int | bitDepth |
| int | bytesPerPixel |
| static String | cHRM A PNG marker. |
| byte[] | colorTable |
| int | colorType |
| int | compressionMethod |
| DataInputStream | dataStream |
| int | dpiX |
| int | dpiY |
| int | filterMethod |
| static String | gAMA A PNG marker. |
| float | gamma |
| boolean | genBWMask |
| boolean | hasCHRM |
| int | height |
| ICC_Profile | icc_profile |
| static String | iCCP A PNG marker. |
| PngImage.NewByteArrayOutputStream | idat |
| byte[] | image |
| int | inputBands |
| PdfName | intent |
| static PdfName[] | intents |
| int | interlaceMethod |
| InputStream | is |
| static String | IDAT A PNG marker. |
| static String | IEND A PNG marker. |
| static String | IHDR A PNG marker. |
| boolean | palShades |
| static String | pHYs A PNG marker. |
| static String | PLTE A PNG marker. |
| static int[] | PNGID Some PNG specific values. |
| static int | PNG_FILTER_AVERAGE |
| static int | PNG_FILTER_NONE |
| static int | PNG_FILTER_PAETH |
| static int | PNG_FILTER_SUB |
| static int | PNG_FILTER_UP |
| byte[] | smask |
| static String | sRGB A PNG marker. |
| byte[] | trans |
| int | transBlue |
| int | transGreen |
| int | transRedGray |
| static String | tRNS A PNG marker. |
| static int | TRANSFERSIZE |
| int | width |
| float | xB |
| float | xG |
| float | xR |
| float | xW |
| float | XYRatio |
| float | yB |
| float | yG |
| float | yR |
| float | yW |
| Constructor Summary | |
|---|---|
| PngImage(InputStream is) Creates a new instance of PngImage | |
| Method Summary | |
|---|---|
| boolean | checkMarker(String s) |
| static void | decodeAverageFilter(byte[] curr, byte[] prev, int count, int bpp) |
| void | decodeIdat() |
| static void | decodePaethFilter(byte[] curr, byte[] prev, int count, int bpp) |
| void | decodePass(int xOffset, int yOffset, int xStep, int yStep, int passWidth, int passHeight) |
| static void | decodeSubFilter(byte[] curr, int count, int bpp) |
| static void | decodeUpFilter(byte[] curr, byte[] prev, int count) |
| PdfObject | getColorspace() |
| static Image | getImage(URL url) Reads a PNG from an url. |
| static Image | getImage(InputStream is) Reads a PNG from a stream. |
| static Image | getImage(String file) Reads a PNG from a file. |
| static Image | getImage(byte[] data) Reads a PNG from a byte array. |
| Image | getImage() |
| static int | getInt(InputStream is)
Gets an int from an InputStream.
|
| static int | getPixel(byte[] image, int x, int y, int bitDepth, int bytesPerRow) |
| int[] | getPixel(byte[] curr) |
| static String | getString(InputStream is)
Gets a String from an InputStream.
|
| static int | getWord(InputStream is)
Gets a word from an InputStream.
|
| static int | paethPredictor(int a, int b, int c) |
| void | processPixels(byte[] curr, int xOffset, int step, int y, int width) |
| void | readPng() |
| static void | setPixel(byte[] image, int[] data, int offset, int size, int x, int y, int bitDepth, int bytesPerRow) |
Parameters: url the url
Returns: the image
Throws: IOException on error
Parameters: is the stream
Returns: the image
Throws: IOException on error
Parameters: file the file
Returns: the image
Throws: IOException on error
Parameters: data the byte array
Returns: the image
Throws: IOException on error
int from an InputStream.
Parameters: is an InputStream
Returns: the value of an int
String from an InputStream.
Parameters: is an InputStream
Returns: the value of an int
word from an InputStream.
Parameters: is an InputStream
Returns: the value of an int