Top Fields Constructors Methods
org.eclipse.swt.internal.image

public Class PngTrnsChunk

extends PngChunk
Class Inheritance
Imports
org.eclipse.swt.*, org.eclipse.swt.graphics.*

Field Summary

Modifier and TypeField and Description
pack-priv static final int
pack-priv static final int
pack-priv static final int
Inherited from org.eclipse.swt.internal.image.PngChunk:
CHUNK_IDATCHUNK_IENDCHUNK_IHDRCHUNK_PLTECHUNK_tRNSCHUNK_UNKNOWNCRC_TABLEDATA_OFFSETlengthLENGTH_FIELD_LENGTHLENGTH_OFFSETMIN_LENGTHreferenceTYPE_FIELD_LENGTHTYPE_IDATTYPE_IENDTYPE_IHDRTYPE_OFFSETTYPE_PLTETYPE_tRNS

Constructor Summary

AccessConstructor and Description
pack-priv
pack-priv
PngTrnsChunk(byte[] reference)

Method Summary

Modifier and TypeMethod and Description
pack-priv byte[]
getAlphaValues(PngIhdrChunk header, PngPlteChunk paletteChunk)

Answer an array of Alpha values that correspond to the colors in the palette.

pack-priv int
pack-priv int
getSwtTransparentPixel(PngIhdrChunk header)

Answer the transparent pixel RGB value.

pack-priv int
pack-priv void
validate(PngFileReadState readState, PngIhdrChunk headerChunk, PngPlteChunk paletteChunk)

Answer whether the chunk is a valid tRNS chunk.

pack-priv void
Inherited from org.eclipse.swt.internal.image.PngChunk:
checkCRCcomputeCRCcontributeToStringgetCRCgetDatagetInt16getInt32getLengthgetReferencegetSizegetTypeBytesisCriticalreadNextFromStreamsetCRCsetDatasetInt16setInt32setLengthsetReferencesetTypetoStringtypeMatchesArrayvalidate

Field Detail

RGB_DATA_LENGTHback to summary
pack-priv static final int RGB_DATA_LENGTH
TRANSPARENCY_TYPE_ALPHASback to summary
pack-priv static final int TRANSPARENCY_TYPE_ALPHAS
TRANSPARENCY_TYPE_PIXELback to summary
pack-priv static final int TRANSPARENCY_TYPE_PIXEL

Constructor Detail

PngTrnsChunkback to summary
pack-priv PngTrnsChunk(RGB rgb)
PngTrnsChunkback to summary
pack-priv PngTrnsChunk(byte[] reference)

Method Detail

getAlphaValuesback to summary
pack-priv byte[] getAlphaValues(PngIhdrChunk header, PngPlteChunk paletteChunk)

Answer an array of Alpha values that correspond to the colors in the palette. This is only valid for the COLOR_TYPE_PALETTE color type.

getChunkTypeback to summary
pack-priv int getChunkType()

Overrides org.eclipse.swt.internal.image.PngChunk.getChunkType.

Annotations
@Override
getSwtTransparentPixelback to summary
pack-priv int getSwtTransparentPixel(PngIhdrChunk header)

Answer the transparent pixel RGB value. This is not valid for palette color types. This is not valid for alpha color types. This will convert a grayscale value into a palette index. It will compress a 6 byte RGB into a 3 byte RGB.

getTransparencyTypeback to summary
pack-priv int getTransparencyType(PngIhdrChunk header)
validateback to summary
pack-priv void validate(PngFileReadState readState, PngIhdrChunk headerChunk, PngPlteChunk paletteChunk)

Answer whether the chunk is a valid tRNS chunk.

validateLengthback to summary
pack-priv void validateLength(PngIhdrChunk header, PngPlteChunk paletteChunk)