|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sixlegs.png.PngConstants
public abstract class PngConstants
This interface defines all registered chunk types and provides methods
helper methods to examine them. It also defines all of the keys used in the property map
of a decoded PngImage
, and applicable enumerated values.
PngImage.getProperty(java.lang.String)
,
PngImage.getProperties()
Field Summary | |
---|---|
static String |
BACKGROUND
bKGD : Background samples |
static String |
BIT_DEPTH
IHDR : Bit depth |
static int |
bKGD
Background color |
static int |
cHRM
Primary chromaticities |
static String |
CHROMATICITY
cHRM : Chromaticity |
static String |
COLOR_TYPE
IHDR : Color type |
static int |
COLOR_TYPE_GRAY
IHDR : Grayscale color type |
static int |
COLOR_TYPE_GRAY_ALPHA
IHDR : Grayscale+alpha color type |
static int |
COLOR_TYPE_PALETTE
IHDR : Palette color type |
static int |
COLOR_TYPE_RGB
IHDR : RGB color type |
static int |
COLOR_TYPE_RGB_ALPHA
IHDR : RGBA color type |
static String |
COMPRESSION
IHDR : Compression method |
static int |
COMPRESSION_BASE
IHDR : Deflate/inflate compression |
static String |
FILTER
IHDR : Filter method |
static int |
FILTER_BASE
IHDR : Adaptive filtering |
static int |
gAMA
Image gamma |
static String |
GAMMA
gAMA : Gamma |
static String |
GIF_DELAY_TIME
gIFg : GIF delay time (hundredths of a second) |
static String |
GIF_DISPOSAL_METHOD
gIFg : GIF disposal method |
static String |
GIF_USER_INPUT_FLAG
gIFg : GIF user input flag |
static int |
gIFg
GIF Graphic Control Extension |
static int |
gIFx
GIF Application Extension |
static String |
HEIGHT
IHDR : Height |
static int |
hIST
Palette histogram |
static String |
HISTOGRAM
hIST : Palette histogram |
static String |
ICC_PROFILE
iCCP : ICC profile |
static String |
ICC_PROFILE_NAME
iCCP : ICC profile name |
static int |
iCCP
Embedded ICC profile |
static int |
IDAT
Image data |
static int |
IEND
Image trailer |
static int |
IHDR
Image header |
static String |
INTERLACE
IHDR : Interlace method |
static int |
INTERLACE_ADAM7
IHDR : Adam7 interlace |
static int |
INTERLACE_NONE
IHDR : No interlace |
static int |
iTXt
International textual data |
static int |
oFFs
Image offset |
static String |
PALETTE
PLTE : Palette entries |
static String |
PALETTE_ALPHA
PLTE : Palette alpha |
static int |
pCAL
Calibration of pixel values |
static int |
pHYs
Physical pixel dimensions |
static String |
PIXEL_HEIGHT
sCAL : Physical height of pixel |
static String |
PIXEL_WIDTH
sCAL : Physical width of pixel |
static String |
PIXELS_PER_UNIT_X
pHYs : Pixels per unit, X axis |
static String |
PIXELS_PER_UNIT_Y
pHYs : Pixels per unit, Y axis |
static int |
PLTE
Palette |
static String |
POSITION_UNIT
oFFs : Unit for image offset |
static int |
POSITION_UNIT_MICROMETER
oFFs : Unit is the micrometer (10^-6 meter) |
static int |
POSITION_UNIT_PIXEL
oFFs : Unit is the pixel (true dimensions unspecified) |
static String |
POSITION_X
oFFs : Image X position |
static String |
POSITION_Y
oFFs : Image Y position |
static String |
RENDERING_INTENT
sRGB : Rendering intent |
static int |
sBIT
Significant bits |
static int |
sCAL
Physical scale of image subject |
static String |
SCALE_UNIT
sCAL : Unit for physical scale of image subject |
static int |
SCALE_UNIT_METER
sCAL : Unit is the meter |
static int |
SCALE_UNIT_RADIAN
sCAL : Unit is the radian |
static long |
SIGNATURE
Eight byte magic number that begins all PNG images |
static String |
SIGNIFICANT_BITS
sBIT : Significant bits |
static int |
sPLT
Suggested palette |
static int |
sRGB
Standard RGB color space |
static int |
SRGB_ABSOLUTE_COLORIMETRIC
sRGB : Absolute colormetric rendering intent |
static int |
SRGB_PERCEPTUAL
sRGB : Perceptual rendering intent |
static int |
SRGB_RELATIVE_COLORIMETRIC
sRGB : Relative colorimetric rendering intent |
static int |
SRGB_SATURATION_PRESERVING
sRGB : Saturation rendering intent |
static int |
sTER
Indicator of Stereo Image |
static String |
STEREO_MODE
sTER : Indicator of stereo image |
static int |
STEREO_MODE_CROSS
sTER : Cross-fuse layout |
static int |
STEREO_MODE_DIVERGING
sTER : Diverging-fuse layout |
static String |
SUGGESTED_PALETTES
sPLT : List of suggested palettes |
static int |
tEXt
Textual data |
static String |
TEXT_CHUNKS
tEXt /zTXt /iTXt : List of text chunks |
static int |
tIME
Image last-modification time |
static String |
TIME
tIME : Image last-modification time |
static String |
TRANSPARENCY
tRNS : Transparency samples |
static int |
tRNS
Transparency |
static String |
UNIT
pHYs : Unit specifier |
static int |
UNIT_METER
pHYs : Unit is the meter |
static int |
UNIT_UNKNOWN
pHYs : Unit is unknown |
static String |
WIDTH
IHDR : Width |
static int |
zTXt
Compressed textual data |
Constructor Summary | |
---|---|
PngConstants()
|
Method Summary | |
---|---|
static String |
getChunkName(int chunkType)
Returns the four-character ASCII name corresponding to the given chunk type. |
static int |
getChunkType(String chunkName)
Returns the chunk type corresponding to the given four-character ASCII chunk name. |
static boolean |
isAncillary(int chunkType)
Returns true if the given chunk type has the ancillary bit set
(the first letter is lowercase). |
static boolean |
isPrivate(int chunkType)
Returns true if the given chunk type has the private bit set
(the second letter is lowercase). |
static boolean |
isReserved(int chunkType)
Returns true if the given chunk type has the reserved bit set
(the third letter is lowercase). |
static boolean |
isSafeToCopy(int chunkType)
Returns true if the given chunk type has the safe-to-copy bit set
(the fourth letter is lowercase). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final long SIGNATURE
public static final int IHDR
public static final int PLTE
public static final int IDAT
public static final int IEND
public static final int bKGD
public static final int cHRM
public static final int gAMA
public static final int hIST
public static final int iCCP
public static final int iTXt
public static final int pHYs
public static final int sBIT
public static final int sPLT
public static final int sRGB
public static final int tEXt
public static final int tIME
public static final int tRNS
public static final int zTXt
public static final int oFFs
public static final int pCAL
public static final int sCAL
public static final int gIFg
public static final int gIFx
public static final int sTER
public static final String BIT_DEPTH
IHDR
: Bit depth
public static final String COLOR_TYPE
IHDR
: Color type
public static final String COMPRESSION
IHDR
: Compression method
public static final String FILTER
IHDR
: Filter method
public static final String GAMMA
gAMA
: Gamma
public static final String WIDTH
IHDR
: Width
public static final String HEIGHT
IHDR
: Height
public static final String INTERLACE
IHDR
: Interlace method
public static final String PALETTE
PLTE
: Palette entries
public static final String PALETTE_ALPHA
PLTE
: Palette alpha
public static final String TRANSPARENCY
tRNS
: Transparency samples
public static final String BACKGROUND
bKGD
: Background samples
public static final String PIXELS_PER_UNIT_X
pHYs
: Pixels per unit, X axis
public static final String PIXELS_PER_UNIT_Y
pHYs
: Pixels per unit, Y axis
public static final String RENDERING_INTENT
sRGB
: Rendering intent
public static final String SIGNIFICANT_BITS
sBIT
: Significant bits
public static final String TEXT_CHUNKS
tEXt
/zTXt
/iTXt
: List of text chunks
public static final String TIME
tIME
: Image last-modification time
public static final String UNIT
pHYs
: Unit specifier
public static final String CHROMATICITY
cHRM
: Chromaticity
public static final String ICC_PROFILE
iCCP
: ICC profile
public static final String ICC_PROFILE_NAME
iCCP
: ICC profile name
public static final String HISTOGRAM
hIST
: Palette histogram
public static final String SUGGESTED_PALETTES
sPLT
: List of suggested palettes
public static final String GIF_DISPOSAL_METHOD
gIFg
: GIF disposal method
public static final String GIF_USER_INPUT_FLAG
gIFg
: GIF user input flag
public static final String GIF_DELAY_TIME
gIFg
: GIF delay time (hundredths of a second)
public static final String SCALE_UNIT
sCAL
: Unit for physical scale of image subject
public static final String PIXEL_WIDTH
sCAL
: Physical width of pixel
public static final String PIXEL_HEIGHT
sCAL
: Physical height of pixel
public static final String POSITION_UNIT
oFFs
: Unit for image offset
public static final String STEREO_MODE
sTER
: Indicator of stereo image
public static final int COLOR_TYPE_GRAY
IHDR
: Grayscale color type
public static final int COLOR_TYPE_GRAY_ALPHA
IHDR
: Grayscale+alpha color type
public static final int COLOR_TYPE_PALETTE
IHDR
: Palette color type
public static final int COLOR_TYPE_RGB
IHDR
: RGB color type
public static final int COLOR_TYPE_RGB_ALPHA
IHDR
: RGBA color type
public static final int INTERLACE_NONE
IHDR
: No interlace
public static final int INTERLACE_ADAM7
IHDR
: Adam7 interlace
public static final int FILTER_BASE
IHDR
: Adaptive filtering
public static final int COMPRESSION_BASE
IHDR
: Deflate/inflate compression
public static final int UNIT_UNKNOWN
pHYs
: Unit is unknown
public static final int UNIT_METER
pHYs
: Unit is the meter
public static final int SRGB_PERCEPTUAL
sRGB
: Perceptual rendering intent
public static final int SRGB_RELATIVE_COLORIMETRIC
sRGB
: Relative colorimetric rendering intent
public static final int SRGB_SATURATION_PRESERVING
sRGB
: Saturation rendering intent
public static final int SRGB_ABSOLUTE_COLORIMETRIC
sRGB
: Absolute colormetric rendering intent
public static final String POSITION_X
oFFs
: Image X position
public static final String POSITION_Y
oFFs
: Image Y position
public static final int POSITION_UNIT_PIXEL
oFFs
: Unit is the pixel (true dimensions unspecified)
public static final int POSITION_UNIT_MICROMETER
oFFs
: Unit is the micrometer (10^-6 meter)
public static final int SCALE_UNIT_METER
sCAL
: Unit is the meter
public static final int SCALE_UNIT_RADIAN
sCAL
: Unit is the radian
public static final int STEREO_MODE_CROSS
sTER
: Cross-fuse layout
public static final int STEREO_MODE_DIVERGING
sTER
: Diverging-fuse layout
Constructor Detail |
---|
public PngConstants()
Method Detail |
---|
public static boolean isAncillary(int chunkType)
true
if the given chunk type has the ancillary bit set
(the first letter is lowercase).
An ancillary chunk is once which is not strictly necessary
in order to meaningfully display the contents of the file.
chunkType
- the chunk type
public static boolean isPrivate(int chunkType)
true
if the given chunk type has the private bit set
(the second letter is lowercase).
All unregistered chunk types should have this bit set.
chunkType
- the chunk type
public static boolean isReserved(int chunkType)
true
if the given chunk type has the reserved bit set
(the third letter is lowercase).
The meaning of this bit is currently undefined, but reserved for future use.
Images conforming to the current version of the PNG specification must
not have this bit set.
chunkType
- the chunk type
public static boolean isSafeToCopy(int chunkType)
true
if the given chunk type has the safe-to-copy bit set
(the fourth letter is lowercase).
Chunks marked as safe-to-copy may be copied to a modified PNG file
whether or not the software recognizes the chunk type.
chunkType
- the chunk type
public static String getChunkName(int chunkType)
PngConstants.getChunkName(PngConstants.IHDR)
will
return "IHDR"
.
chunkType
- the chunk type
public static int getChunkType(String chunkName)
chunkName
- the four-character ASCII chunk name
NullPointerException
- if name
is null
IndexOutOfBoundsException
- if name
has less than four characters
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |