Modifier and Type | Class and Description |
---|---|
(package private) static class |
PngImage.NewByteArrayOutputStream |
Modifier and Type | Field and Description |
---|---|
(package private) PdfDictionary |
additional |
(package private) int |
bitDepth |
(package private) int |
bytesPerPixel |
static String |
cHRM
A PNG marker.
|
(package private) byte[] |
colorTable |
(package private) int |
colorType |
(package private) int |
compressionMethod |
(package private) DataInputStream |
dataStream |
(package private) int |
dpiX |
(package private) int |
dpiY |
(package private) int |
filterMethod |
static String |
gAMA
A PNG marker.
|
(package private) float |
gamma |
(package private) boolean |
genBWMask |
(package private) boolean |
hasCHRM |
(package private) int |
height |
(package private) ICC_Profile |
icc_profile |
static String |
iCCP
A PNG marker.
|
(package private) PngImage.NewByteArrayOutputStream |
idat |
static String |
IDAT
A PNG marker.
|
static String |
IEND
A PNG marker.
|
static String |
IHDR
A PNG marker.
|
(package private) byte[] |
image |
(package private) int |
inputBands |
(package private) PdfName |
intent |
private static PdfName[] |
intents |
(package private) int |
interlaceMethod |
(package private) InputStream |
is |
(package private) boolean |
palShades |
static String |
pHYs
A PNG marker.
|
static String |
PLTE
A PNG marker.
|
private static int |
PNG_FILTER_AVERAGE |
private static int |
PNG_FILTER_NONE |
private static int |
PNG_FILTER_PAETH |
private static int |
PNG_FILTER_SUB |
private static int |
PNG_FILTER_UP |
static int[] |
PNGID
Some PNG specific values.
|
(package private) byte[] |
smask |
static String |
sRGB
A PNG marker.
|
(package private) byte[] |
trans |
(package private) int |
transBlue |
private static int |
TRANSFERSIZE |
(package private) int |
transGreen |
(package private) int |
transRedGray |
static String |
tRNS
A PNG marker.
|
(package private) int |
width |
(package private) float |
xB |
(package private) float |
xG |
(package private) float |
xR |
(package private) float |
xW |
(package private) float |
XYRatio |
(package private) float |
yB |
(package private) float |
yG |
(package private) float |
yR |
(package private) float |
yW |
Constructor and Description |
---|
PngImage(InputStream is)
Creates a new instance of PngImage
|
Modifier and Type | Method and Description |
---|---|
(package private) boolean |
checkMarker(String s) |
private static void |
decodeAverageFilter(byte[] curr,
byte[] prev,
int count,
int bpp) |
(package private) void |
decodeIdat() |
private static void |
decodePaethFilter(byte[] curr,
byte[] prev,
int count,
int bpp) |
(package private) void |
decodePass(int xOffset,
int yOffset,
int xStep,
int yStep,
int passWidth,
int passHeight) |
private static void |
decodeSubFilter(byte[] curr,
int count,
int bpp) |
private static void |
decodeUpFilter(byte[] curr,
byte[] prev,
int count) |
(package private) PdfObject |
getColorspace() |
(package private) Image |
getImage() |
static Image |
getImage(byte[] data)
Reads a PNG from a byte array.
|
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(URL url)
Reads a PNG from an url.
|
static int |
getInt(InputStream is)
Gets an
int from an InputStream . |
(package private) int[] |
getPixel(byte[] curr) |
(package private) static int |
getPixel(byte[] image,
int x,
int y,
int bitDepth,
int bytesPerRow) |
static String |
getString(InputStream is)
Gets a
String from an InputStream . |
static int |
getWord(InputStream is)
Gets a
word from an InputStream . |
private static int |
paethPredictor(int a,
int b,
int c) |
(package private) void |
processPixels(byte[] curr,
int xOffset,
int step,
int y,
int width) |
(package private) void |
readPng() |
(package private) static void |
setPixel(byte[] image,
int[] data,
int offset,
int size,
int x,
int y,
int bitDepth,
int bytesPerRow) |
public static final int[] PNGID
public static final String IHDR
public static final String PLTE
public static final String IDAT
public static final String IEND
public static final String tRNS
public static final String pHYs
public static final String gAMA
public static final String cHRM
public static final String sRGB
public static final String iCCP
private static final int TRANSFERSIZE
private static final int PNG_FILTER_NONE
private static final int PNG_FILTER_SUB
private static final int PNG_FILTER_UP
private static final int PNG_FILTER_AVERAGE
private static final int PNG_FILTER_PAETH
InputStream is
DataInputStream dataStream
int width
int height
int bitDepth
int colorType
int compressionMethod
int filterMethod
int interlaceMethod
PdfDictionary additional
byte[] image
byte[] smask
byte[] trans
int dpiX
int dpiY
float XYRatio
boolean genBWMask
boolean palShades
int transRedGray
int transGreen
int transBlue
int inputBands
int bytesPerPixel
byte[] colorTable
float gamma
boolean hasCHRM
float xW
float yW
float xR
float yR
float xG
float yG
float xB
float yB
ICC_Profile icc_profile
PngImage(InputStream is)
public static Image getImage(URL url) throws IOException
url
- the urlIOException
- on errorpublic static Image getImage(InputStream is) throws IOException
is
- the streamIOException
- on errorpublic static Image getImage(String file) throws IOException
file
- the fileIOException
- on errorpublic static Image getImage(byte[] data) throws IOException
data
- the byte arrayIOException
- on errorboolean checkMarker(String s)
void readPng() throws IOException
IOException
PdfObject getColorspace()
Image getImage() throws IOException
IOException
void decodeIdat()
void decodePass(int xOffset, int yOffset, int xStep, int yStep, int passWidth, int passHeight)
void processPixels(byte[] curr, int xOffset, int step, int y, int width)
static int getPixel(byte[] image, int x, int y, int bitDepth, int bytesPerRow)
static void setPixel(byte[] image, int[] data, int offset, int size, int x, int y, int bitDepth, int bytesPerRow)
int[] getPixel(byte[] curr)
private static void decodeSubFilter(byte[] curr, int count, int bpp)
private static void decodeUpFilter(byte[] curr, byte[] prev, int count)
private static void decodeAverageFilter(byte[] curr, byte[] prev, int count, int bpp)
private static int paethPredictor(int a, int b, int c)
private static void decodePaethFilter(byte[] curr, byte[] prev, int count, int bpp)
public static final int getInt(InputStream is) throws IOException
int
from an InputStream
.is
- an InputStream
int
IOException
public static final int getWord(InputStream is) throws IOException
word
from an InputStream
.is
- an InputStream
int
IOException
public static final String getString(InputStream is) throws IOException
String
from an InputStream
.is
- an InputStream
int
IOException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses