public class PngChunkTRNS extends PngChunkSingle
see http://www.w3.org/TR/PNG/#11tRNS
this chunk structure depends on the image type
PngChunk.ChunkOrderingConstraint
Constructor and Description |
---|
PngChunkTRNS(ImageInfo info) |
Modifier and Type | Method and Description |
---|---|
ChunkRaw |
createRawChunk()
Creates the physical chunk.
|
int |
getGray() |
PngChunk.ChunkOrderingConstraint |
getOrderingConstraint()
|
int[] |
getPalletteAlpha()
WARNING: non deep copy
|
int[] |
getRGB() |
int |
getRGB888() |
void |
parseFromRaw(ChunkRaw c)
Parses raw chunk and fill inside data.
|
void |
setEntryPalAlpha(int idx,
int val)
Sets the length of the palette alpha.
|
void |
setGray(int g) |
void |
setIndexEntryAsTransparent(int palAlphaIndex)
to use when only one pallete index is set as totally transparent
|
void |
setNentriesPalAlpha(int len) |
void |
setPalAlpha(int[] palAlpha)
WARNING: non deep copy.
|
void |
setRGB(int r,
int g,
int b)
Set rgb values
|
allowsMultiple, equals, hashCode
createEmptyChunk, getChunkGroup, getLen, getOffset, getRaw, hasPriority, invalidateRawData, setPriority, toString
public static final String ID
public PngChunkTRNS(ImageInfo info)
public PngChunk.ChunkOrderingConstraint getOrderingConstraint()
PngChunk
getOrderingConstraint
in class PngChunk
public ChunkRaw createRawChunk()
PngChunk
createRawChunk
in class PngChunk
public void parseFromRaw(ChunkRaw c)
PngChunk
parseFromRaw
in class PngChunk
public void setRGB(int r, int g, int b)
public int[] getRGB()
public int getRGB888()
public void setGray(int g)
public int getGray()
public void setEntryPalAlpha(int idx, int val)
idx
- index inside the tableval
- alpha value (0-255)public void setNentriesPalAlpha(int len)
public void setPalAlpha(int[] palAlpha)
setNentriesPalAlpha(int)
setEntryPalAlpha(int, int)
public int[] getPalletteAlpha()
public void setIndexEntryAsTransparent(int palAlphaIndex)
Copyright © 2014. All rights reserved.