public class PngImage
extends java.lang.Object
It is based in part in the JAI codec.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
cHRM
A PNG marker.
|
static java.lang.String |
gAMA
A PNG marker.
|
static java.lang.String |
iCCP
A PNG marker.
|
static java.lang.String |
IDAT
A PNG marker.
|
static java.lang.String |
IEND
A PNG marker.
|
static java.lang.String |
IHDR
A PNG marker.
|
static java.lang.String |
pHYs
A PNG marker.
|
static java.lang.String |
PLTE
A PNG marker.
|
static int[] |
PNGID
Some PNG specific values.
|
static java.lang.String |
sRGB
A PNG marker.
|
static java.lang.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(java.io.InputStream is)
Reads a PNG from a stream.
|
static Image |
getImage(java.lang.String file)
Reads a PNG from a file.
|
static Image |
getImage(java.net.URL url)
Reads a PNG from an url.
|
static int |
getInt(java.io.InputStream is)
Gets an
int from an InputStream . |
static java.lang.String |
getString(java.io.InputStream is)
Gets a
String from an InputStream . |
static int |
getWord(java.io.InputStream is)
Gets a
word from an InputStream . |
public static final int[] PNGID
public static final java.lang.String IHDR
public static final java.lang.String PLTE
public static final java.lang.String IDAT
public static final java.lang.String IEND
public static final java.lang.String tRNS
public static final java.lang.String pHYs
public static final java.lang.String gAMA
public static final java.lang.String cHRM
public static final java.lang.String sRGB
public static final java.lang.String iCCP
public static Image getImage(java.net.URL url) throws java.io.IOException
url
- the urljava.io.IOException
- on errorpublic static Image getImage(java.io.InputStream is) throws java.io.IOException
is
- the streamjava.io.IOException
- on errorpublic static Image getImage(java.lang.String file) throws java.io.IOException
file
- the filejava.io.IOException
- on errorpublic static Image getImage(byte[] data) throws java.io.IOException
data
- the byte arrayjava.io.IOException
- on errorpublic static final int getInt(java.io.InputStream is) throws java.io.IOException
int
from an InputStream
.is
- an InputStream
int
java.io.IOException
public static final int getWord(java.io.InputStream is) throws java.io.IOException
word
from an InputStream
.is
- an InputStream
int
java.io.IOException
public static final java.lang.String getString(java.io.InputStream is) throws java.io.IOException
String
from an InputStream
.is
- an InputStream
int
java.io.IOException
Copyright © 2013. All Rights Reserved.