C# Class SwfDotNet.IO.Tags.DefineBitsJpeg3Tag

DefineBitsJpeg3Tag is used to define a transparent JPEG encoded image.

It extends the DefineBitsJpeg2Tag class by including a separate zlib compressed table of alpha channel values. This allows the transparency of existing JPEG encoded images to be changed without re-encoding the original image.

Although the encoding table defines how the image is compressed it is not essential. If a DefineBitsJpeg3Tag object is created with an empty encoding table then the Flash Player will still display the JPEG image correctly. The empty encoding table is not a null object. It contains four bytes: 0xFF, 0xD9, 0xFF, 0xD8. Note however that this is reversed from StartOfImage (SOI, 0xFFD8) and EndOfImage (EOI, 0xFFD9) tags defined in the JPEG file format specification. This appears to be a bug in Flash. However the order is preserved to ensure compatibility although code has been tested with the normal order for the tags and the images were displayed correctly.

This tag was introduced in Flash 3.

Inheritance: DefineBitsJpeg2Tag
Mostra file Open project: bladecoding/SwfExport Class Usage Examples

Public Methods

Method Description
DefineBitsJpeg3Tag ( ) : System

Creates a new DefineBitsJpeg3Tag instance.

DefineBitsJpeg3Tag ( ushort id, byte image, byte alpha ) : System

Creates a new DefineBitsJpeg3Tag instance.

FromFile ( ushort characterId, string fileName ) : DefineBitsJpeg3Tag

Construct a new DefineBitsJpeg3Tag object from a file.

FromImage ( ushort characterId, Image image ) : DefineBitsJpeg3Tag

Construct a new DefineBitsJpeg3Tag object from an image object.

FromStream ( ushort characterId, Stream stream ) : DefineBitsJpeg3Tag

Construct a new DefineBitsJpeg3Tag object from a stream.

GetSizeOf ( ) : int

Gets the size of.

ReadData ( byte version, BufferedBinaryReader binaryReader ) : void

see base class

UpdateData ( byte version ) : void

see base class

Method Details

DefineBitsJpeg3Tag() public method

Creates a new DefineBitsJpeg3Tag instance.
public DefineBitsJpeg3Tag ( ) : System
return System

DefineBitsJpeg3Tag() public method

Creates a new DefineBitsJpeg3Tag instance.
public DefineBitsJpeg3Tag ( ushort id, byte image, byte alpha ) : System
id ushort Id.
image byte Image.
alpha byte Alpha.
return System

FromFile() public static method

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

FromImage() public static method

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

FromStream() public static method

Construct a new DefineBitsJpeg3Tag object from a stream.
public static FromStream ( ushort characterId, Stream stream ) : DefineBitsJpeg3Tag
characterId ushort Character id.
stream Stream Stream.
return DefineBitsJpeg3Tag

GetSizeOf() public method

Gets the size of.
public GetSizeOf ( ) : int
return int

ReadData() public method

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

UpdateData() public method

see base class
public UpdateData ( byte version ) : void
version byte
return void