C# Class SwfDotNet.IO.Tags.DefineBitsLossLess2Tag

DefineBitsLossLess2Tag is used to define a transparent image compressed using the lossless zlib compression algorithm.

The class supports color-mapped images where the image data contains an index into a color table or images where the image data specifies the color directly. It extends FSDefineImage by including alpha channel information for the color table and pixels in the image.

For color-mapped images the color table contains up to 256, 32-bit colors. The image contains one byte for each pixel which is an index into the table to specify the color for that pixel. The color table and the image data are compressed as a single block, with the color table placed before the image.

For images where the color is specified directly, the image data contains 32 bit color values.

The image data is stored in zlib compressed form within the object. For color-mapped images the compressed data contains the color table followed by the image data.

This tag was introduced in Flash 3.

Inheritance: BaseTag, DefineTag
Afficher le fichier Open project: bladecoding/SwfExport Class Usage Examples

Méthodes publiques

Méthode Description
DecompileToFile ( string fileName ) : void

Decompiles to file.

DecompileToImage ( ) : Image

Decompiles to image.

DefineBitsLossLess2Tag ( ) : System

Creates a new DefineBitsLossLess2Tag instance.

DefineBitsLossLess2Tag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, ushort bitmapColorTableSize ) : System

Creates a new DefineBitsLossLess2Tag instance.

DefineBitsLossLess2Tag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, ushort bitmapColorTableSize, AlphaBitmapData zlibBitmapData ) : System

Creates a new DefineBitsLossLess2Tag instance.

DefineBitsLossLess2Tag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, ushort bitmapColorTableSize, AlphaColorMapData zlibBitmapData ) : System

Creates a new DefineBitsLossLess2Tag instance.

FromFile ( ushort characterId, string fileName ) : DefineBitsLossLess2Tag

Construct a new DefineBitsLossLess2Tag object from a file.

FromImage ( ushort characterId, Image image ) : DefineBitsLossLess2Tag

Construct a new DefineBitsLossLess2Tag object from an image object.

FromStream ( ushort characterId, Stream stream ) : DefineBitsLossLess2Tag

Construct a new DefineBitsLossLess2Tag object from a stream.

GetSizeOf ( int lengthOfCompressedData ) : int

Gets the size of.

ReadData ( byte version, BufferedBinaryReader binaryReader ) : void

see base class

Serialize ( XmlWriter writer ) : void

Serializes the specified writer.

UpdateData ( byte version ) : void

see base class

Private Methods

Méthode Description
DecompileToStream ( Stream stream ) : void

Decompiles to stream.

Method Details

DecompileToFile() public méthode

Decompiles to file.
public DecompileToFile ( string fileName ) : void
fileName string Name of the file.
Résultat void

DecompileToImage() public méthode

Decompiles to image.
public DecompileToImage ( ) : Image
Résultat Image

DefineBitsLossLess2Tag() public méthode

Creates a new DefineBitsLossLess2Tag instance.
public DefineBitsLossLess2Tag ( ) : System
Résultat System

DefineBitsLossLess2Tag() public méthode

Creates a new DefineBitsLossLess2Tag instance.
public DefineBitsLossLess2Tag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, ushort bitmapColorTableSize ) : System
characterId ushort id for this character
bitmapFormat byte Format of compressed data
bitmapWidth ushort Width of bitmap image
bitmapHeight ushort Height of bitmap image
bitmapColorTableSize ushort actual number of colors in the color table
Résultat System

DefineBitsLossLess2Tag() public méthode

Creates a new DefineBitsLossLess2Tag instance.
public DefineBitsLossLess2Tag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, ushort bitmapColorTableSize, AlphaBitmapData zlibBitmapData ) : System
characterId ushort id for this character
bitmapFormat byte Format of compressed data
bitmapWidth ushort Width of bitmap image
bitmapHeight ushort Height of bitmap image
bitmapColorTableSize ushort actual number of colors in the color table
zlibBitmapData SwfDotNet.IO.Tags.Types.AlphaBitmapData zlib compressed bitmap data
Résultat System

DefineBitsLossLess2Tag() public méthode

Creates a new DefineBitsLossLess2Tag instance.
public DefineBitsLossLess2Tag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, ushort bitmapColorTableSize, AlphaColorMapData zlibBitmapData ) : System
characterId ushort id for this character
bitmapFormat byte Format of compressed data
bitmapWidth ushort Width of bitmap image
bitmapHeight ushort Height of bitmap image
bitmapColorTableSize ushort actual number of colors in the color table
zlibBitmapData SwfDotNet.IO.Tags.Types.AlphaColorMapData zlib compressed bitmap data
Résultat System

FromFile() public static méthode

Construct a new DefineBitsLossLess2Tag object from a file.
public static FromFile ( ushort characterId, string fileName ) : DefineBitsLossLess2Tag
characterId ushort Character id.
fileName string Name of the file.
Résultat DefineBitsLossLess2Tag

FromImage() public static méthode

Construct a new DefineBitsLossLess2Tag object from an image object.
public static FromImage ( ushort characterId, Image image ) : DefineBitsLossLess2Tag
characterId ushort Character id.
image Image Image.
Résultat DefineBitsLossLess2Tag

FromStream() public static méthode

Construct a new DefineBitsLossLess2Tag object from a stream.
public static FromStream ( ushort characterId, Stream stream ) : DefineBitsLossLess2Tag
characterId ushort Character id.
stream Stream Stream.
Résultat DefineBitsLossLess2Tag

GetSizeOf() public méthode

Gets the size of.
public GetSizeOf ( int lengthOfCompressedData ) : int
lengthOfCompressedData int Length of compressed data.
Résultat int

ReadData() public méthode

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
Résultat void

Serialize() public méthode

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
Résultat void

UpdateData() public méthode

see base class
public UpdateData ( byte version ) : void
version byte
Résultat void