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 |
|---|---|
PngChunk |
cloneForWrite(ImageInfo imgInfo)
Makes a copy of the chunk.
|
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 |
setGray(int g) |
void |
setIndexEntryAsTransparent(int palAlphaIndex)
to use when only one pallete index is set as totally transparent
|
void |
setPalletteAlpha(int[] palAlpha)
WARNING: non deep copy
|
void |
setRGB(int r,
int g,
int b)
Set rgb values
|
allowsMultiple, equals, hashCodecreateEmptyChunk, getChunkGroup, getLen, getOffset, getRaw, hasPriority, setPriority, toStringpublic static final String ID
public PngChunkTRNS(ImageInfo info)
public PngChunk.ChunkOrderingConstraint getOrderingConstraint()
PngChunkgetOrderingConstraint in class PngChunkpublic ChunkRaw createRawChunk()
PngChunkcreateRawChunk in class PngChunkpublic void parseFromRaw(ChunkRaw c)
PngChunkparseFromRaw in class PngChunkpublic PngChunk cloneForWrite(ImageInfo imgInfo)
PngChunkThis is used when copying chunks from a reader to a writer
This is usually a (shallow) copy, and after the cloning this.equals(other) should return true
cloneForWrite in class PngChunkpublic void setRGB(int r,
int g,
int b)
public int[] getRGB()
public int getRGB888()
public void setGray(int g)
public int getGray()
public void setPalletteAlpha(int[] palAlpha)
public void setIndexEntryAsTransparent(int palAlphaIndex)
public int[] getPalletteAlpha()
Copyright © 2013. All rights reserved.