C# Класс 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.

Наследование: DefineBitsJpeg2Tag
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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

Описание методов

DefineBitsJpeg3Tag() публичный Метод

Creates a new DefineBitsJpeg3Tag instance.
public DefineBitsJpeg3Tag ( ) : System
Результат System

DefineBitsJpeg3Tag() публичный Метод

Creates a new DefineBitsJpeg3Tag instance.
public DefineBitsJpeg3Tag ( ushort id, byte image, byte alpha ) : System
id ushort Id.
image byte Image.
alpha byte Alpha.
Результат System

FromFile() публичный статический Метод

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.
Результат DefineBitsJpeg3Tag

FromImage() публичный статический Метод

Construct a new DefineBitsJpeg3Tag object from an image object.
public static FromImage ( ushort characterId, Image image ) : DefineBitsJpeg3Tag
characterId ushort Character id.
image Image Image.
Результат DefineBitsJpeg3Tag

FromStream() публичный статический Метод

Construct a new DefineBitsJpeg3Tag object from a stream.
public static FromStream ( ushort characterId, Stream stream ) : DefineBitsJpeg3Tag
characterId ushort Character id.
stream Stream Stream.
Результат DefineBitsJpeg3Tag

GetSizeOf() публичный Метод

Gets the size of.
public GetSizeOf ( ) : int
Результат int

ReadData() публичный Метод

see base class
public ReadData ( byte version, BufferedBinaryReader binaryReader ) : void
version byte
binaryReader SwfDotNet.IO.Utils.BufferedBinaryReader
Результат void

UpdateData() публичный Метод

see base class
public UpdateData ( byte version ) : void
version byte
Результат void