C# 클래스 SwfDotNet.IO.Tags.DefineBitsLossLessTag

DefineBitsLossLessTag is used to define an 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.

For color-mapped images the color table contains up to 256, 24-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 either 16 or 24 bit color values. For 16-bit color values the most significant bit is zero followed by three, 5-bit fields for the red, green and blue channels.

Four bytes are used to represent 24-bit colors. The first byte is always set to zero and the following bytes contain the color values for the red, green and blue color channels.

The number of bytes in each row of an image must be aligned to a 32-bit word boundary. For example if an image if an icon is 25 pixels wide, then for an 8-bit color mapped image an additional three bytes (0x00) must be used to pad each row; for a 16-bit direct mapped color image an additional two bytes must be used as padding.

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. The color table is omitted for direct-mapped images.

This tag was introduced in Flash 2.

상속: BaseTag, DefineTag
파일 보기 프로젝트 열기: bladecoding/SwfExport 1 사용 예제들

공개 메소드들

메소드 설명
DecompileToFile ( string fileName ) : void

Decompiles to file.

DecompileToImage ( ) : Image

Decompiles to image.

DefineBitsLossLessTag ( ) : System

Creates a new DefineBitsLossLessTag instance.

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

constructor.

DefineBitsLossLessTag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, byte bitmapColorTableSize, BitmapColorData zlibBitmapData ) : System

constructor.

DefineBitsLossLessTag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, byte bitmapColorTableSize, ColorMapData zlibBitmapData ) : System

constructor.

FromFile ( ushort characterId, string fileName ) : DefineBitsLossLessTag

Construct a new DefineBitsLossLessTag object from a file.

FromImage ( ushort characterId, Image image ) : DefineBitsLossLessTag

Construct a new DefineBitsLossLessTag object from an image object.

FromStream ( ushort characterId, Stream stream ) : DefineBitsLossLessTag

Construct a new DefineBitsLossLessTag object from a stream.

GetSizeOf ( int sizeOfCompressedData ) : 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

비공개 메소드들

메소드 설명
DecompileToStream ( Stream stream ) : void

Decompiles to stream.

메소드 상세

DecompileToFile() 공개 메소드

Decompiles to file.
public DecompileToFile ( string fileName ) : void
fileName string Name of the file.
리턴 void

DecompileToImage() 공개 메소드

Decompiles to image.
public DecompileToImage ( ) : Image
리턴 Image

DefineBitsLossLessTag() 공개 메소드

Creates a new DefineBitsLossLessTag instance.
public DefineBitsLossLessTag ( ) : System
리턴 System

DefineBitsLossLessTag() 공개 메소드

constructor.
public DefineBitsLossLessTag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, byte 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 byte actual number of colors in the color table
리턴 System

DefineBitsLossLessTag() 공개 메소드

constructor.
public DefineBitsLossLessTag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, byte bitmapColorTableSize, BitmapColorData 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 byte actual number of colors in the color table
zlibBitmapData SwfDotNet.IO.Tags.Types.BitmapColorData zlib compressed bitmap data
리턴 System

DefineBitsLossLessTag() 공개 메소드

constructor.
public DefineBitsLossLessTag ( ushort characterId, byte bitmapFormat, ushort bitmapWidth, ushort bitmapHeight, byte bitmapColorTableSize, ColorMapData 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 byte actual number of colors in the color table
zlibBitmapData SwfDotNet.IO.Tags.Types.ColorMapData zlib compressed bitmap data
리턴 System

FromFile() 공개 정적인 메소드

Construct a new DefineBitsLossLessTag object from a file.
public static FromFile ( ushort characterId, string fileName ) : DefineBitsLossLessTag
characterId ushort Character id.
fileName string Name of the file.
리턴 DefineBitsLossLessTag

FromImage() 공개 정적인 메소드

Construct a new DefineBitsLossLessTag object from an image object.
public static FromImage ( ushort characterId, Image image ) : DefineBitsLossLessTag
characterId ushort Character id.
image Image Image.
리턴 DefineBitsLossLessTag

FromStream() 공개 정적인 메소드

Construct a new DefineBitsLossLessTag object from a stream.
public static FromStream ( ushort characterId, Stream stream ) : DefineBitsLossLessTag
characterId ushort Character id.
stream Stream Stream.
리턴 DefineBitsLossLessTag

GetSizeOf() 공개 메소드

Gets the size of.
public GetSizeOf ( int sizeOfCompressedData ) : int
sizeOfCompressedData int
리턴 int

ReadData() 공개 메소드

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
리턴 void

Serialize() 공개 메소드

Serializes the specified writer.
public Serialize ( XmlWriter writer ) : void
writer System.Xml.XmlWriter Writer.
리턴 void

UpdateData() 공개 메소드

see base class
public UpdateData ( byte version ) : void
version byte
리턴 void