public class PngImage extends Object
It is based in part in the JAI codec.
Modifier and Type | Field and Description |
---|---|
static String |
cHRM
A PNG marker.
|
static String |
gAMA
A PNG marker.
|
static String |
iCCP
A PNG marker.
|
static String |
IDAT
A PNG marker.
|
static String |
IEND
A PNG marker.
|
static String |
IHDR
A PNG marker.
|
static String |
pHYs
A PNG marker.
|
static String |
PLTE
A PNG marker.
|
static int[] |
PNGID
Some PNG specific values.
|
static String |
sRGB
A PNG marker.
|
static String |
tRNS
A PNG marker.
|
Modifier and Type | Method and Description |
---|---|
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 .
|
static String |
getString(InputStream is)
Gets a String from an InputStream .
|
static int |
getWord(InputStream is)
Gets a word from an InputStream .
|
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
public static Image getImage(URL url) throws IOException
url
- the url
IOException
- on error
public static Image getImage(InputStream is) throws IOException
is
- the stream
IOException
- on error
public static Image getImage(String file) throws IOException
file
- the file
IOException
- on error
public static Image getImage(byte[] data) throws IOException
data
- the byte array
IOException
- on error
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
Copyright © 1998–2024. All rights reserved.