C# Класс BitMiracle.LibTiff.Classic.Internal.JpegCodec

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

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

Метод Описание
Cleanup ( ) : void

Cleanups the state of the codec.

Cleanup is called when codec is no longer needed (won't be used) and can be used for example to restore tag methods that were substituted.

DecodeRow ( byte buffer, int offset, int count, short plane ) : bool

Decodes one row of image data.

DecodeStrip ( byte buffer, int offset, int count, short plane ) : bool

Decodes one strip of image data.

DecodeTile ( byte buffer, int offset, int count, short plane ) : bool

Decodes one tile of image data.

DefStripSize ( int size ) : int

Calculates and/or constrains a strip size.

DefTileSize ( int &width, int &height ) : void

Calculate and/or constrains a tile size

EncodeRow ( byte buffer, int offset, int count, short plane ) : bool

Encodes one row of image data.

EncodeStrip ( byte buffer, int offset, int count, short plane ) : bool

Encodes one strip of image data.

EncodeTile ( byte buffer, int offset, int count, short plane ) : bool

Encodes one tile of image data.

GetTiff ( ) : Tiff
Init ( ) : bool
InitializeLibJPEG ( bool force_encode, bool force_decode ) : bool
JPEGResetUpsampled ( ) : void
JpegCodec ( Tiff tif, Compression scheme, string name ) : System
PostEncode ( ) : bool

Performs any actions after encoding required by the codec.

PostEncode is called after encoding and can be used to release any external resources needed during encoding.

PreDecode ( short plane ) : bool

Prepares the decoder part of the codec for a decoding.

PreDecode is called after SetupDecode and before decoding.

PreEncode ( short plane ) : bool

Prepares the encoder part of the codec for a encoding.

PreEncode is called after SetupEncode and before encoding.

SetupDecode ( ) : bool

Setups the decoder part of the codec.

SetupDecode is called once before PreDecode.

SetupEncode ( ) : bool

Setups the encoder part of the codec.

SetupEncode is called once before PreEncode.

Приватные методы

Метод Описание
JPEGCleanup ( ) : void
JPEGDecode ( byte buffer, int offset, int count, short plane ) : bool

Decode a chunk of pixels. "Standard" case: returned data is not downsampled.

JPEGDecodeRaw ( byte buffer, int offset, int count, short plane ) : bool

Decode a chunk of pixels. Returned data is downsampled per sampling factors.

JPEGDefaultStripSize ( int s ) : int
JPEGDefaultTileSize ( int &tw, int &th ) : void
JPEGEncode ( byte buffer, int offset, int count, short plane ) : bool

Encode a chunk of pixels. "Standard" case: incoming data is not downsampled.

JPEGEncodeRaw ( byte buffer, int offset, int count, short plane ) : bool

Encode a chunk of pixels. Incoming data is expected to be downsampled per sampling factors.

JPEGPostEncode ( ) : bool

Finish up at the end of a strip or tile.

JPEGPreDecode ( short s ) : bool
JPEGPreEncode ( short s ) : bool

Set encoding state at the start of a strip or tile.

JPEGSetupDecode ( ) : bool
JPEGSetupEncode ( ) : bool
TIFFjpeg_abort ( ) : bool
TIFFjpeg_alloc_sarray ( int samplesperrow, int numrows ) : byte[][]
TIFFjpeg_create_compress ( ) : bool
TIFFjpeg_create_decompress ( ) : bool
TIFFjpeg_data_dest ( ) : void
TIFFjpeg_destroy ( ) : bool
TIFFjpeg_finish_compress ( ) : bool
TIFFjpeg_finish_decompress ( ) : bool
TIFFjpeg_read_header ( bool require_image ) : ReadResult
TIFFjpeg_read_raw_data ( byte data, int max_lines ) : int
TIFFjpeg_read_scanlines ( byte scanlines, int max_lines ) : int
TIFFjpeg_set_colorspace ( J_COLOR_SPACE colorspace ) : bool
TIFFjpeg_set_defaults ( ) : bool
TIFFjpeg_set_quality ( int quality, bool force_baseline ) : bool
TIFFjpeg_start_compress ( bool write_all_tables ) : bool
TIFFjpeg_start_decompress ( ) : bool
TIFFjpeg_suppress_tables ( bool suppress ) : bool
TIFFjpeg_tables_dest ( ) : bool
TIFFjpeg_write_raw_data ( byte data, int num_lines ) : int
TIFFjpeg_write_scanlines ( byte scanlines, int num_lines ) : int
TIFFjpeg_write_tables ( ) : bool
alloc_downsampled_buffers ( jpeg_component_info comp_info, int num_components ) : bool
cleanState ( ) : void
prepare_JPEGTables ( ) : bool
unsuppress_huff_table ( int tblno ) : void
unsuppress_quant_table ( int tblno ) : void

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

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

Cleanups the state of the codec.
Cleanup is called when codec is no longer needed (won't be used) and can be used for example to restore tag methods that were substituted.
public Cleanup ( ) : void
Результат void

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

Decodes one row of image data.
public DecodeRow ( byte buffer, int offset, int count, short plane ) : bool
buffer byte The buffer to place decoded image data to.
offset int The zero-based byte offset in at /// which to begin storing decoded bytes.
count int The number of decoded bytes that should be placed /// to
plane short The zero-based sample plane index.
Результат bool

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

Decodes one strip of image data.
public DecodeStrip ( byte buffer, int offset, int count, short plane ) : bool
buffer byte The buffer to place decoded image data to.
offset int The zero-based byte offset in at /// which to begin storing decoded bytes.
count int The number of decoded bytes that should be placed /// to
plane short The zero-based sample plane index.
Результат bool

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

Decodes one tile of image data.
public DecodeTile ( byte buffer, int offset, int count, short plane ) : bool
buffer byte The buffer to place decoded image data to.
offset int The zero-based byte offset in at /// which to begin storing decoded bytes.
count int The number of decoded bytes that should be placed /// to
plane short The zero-based sample plane index.
Результат bool

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

Calculates and/or constrains a strip size.
public DefStripSize ( int size ) : int
size int The proposed strip size (may be zero or negative).
Результат int

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

Calculate and/or constrains a tile size
public DefTileSize ( int &width, int &height ) : void
width int The proposed tile width upon the call / tile width to use after the call.
height int The proposed tile height upon the call / tile height to use after the call.
Результат void

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

Encodes one row of image data.
public EncodeRow ( byte buffer, int offset, int count, short plane ) : bool
buffer byte The buffer with image data to be encoded.
offset int The zero-based byte offset in at /// which to begin read image data.
count int The maximum number of encoded bytes that can be placed /// to
plane short The zero-based sample plane index.
Результат bool

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

Encodes one strip of image data.
public EncodeStrip ( byte buffer, int offset, int count, short plane ) : bool
buffer byte The buffer with image data to be encoded.
offset int The zero-based byte offset in at /// which to begin read image data.
count int The maximum number of encoded bytes that can be placed /// to
plane short The zero-based sample plane index.
Результат bool

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

Encodes one tile of image data.
public EncodeTile ( byte buffer, int offset, int count, short plane ) : bool
buffer byte The buffer with image data to be encoded.
offset int The zero-based byte offset in at /// which to begin read image data.
count int The maximum number of encoded bytes that can be placed /// to
plane short The zero-based sample plane index.
Результат bool

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

public GetTiff ( ) : Tiff
Результат Tiff

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

public Init ( ) : bool
Результат bool

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

public InitializeLibJPEG ( bool force_encode, bool force_decode ) : bool
force_encode bool
force_decode bool
Результат bool

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

public JPEGResetUpsampled ( ) : void
Результат void

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

public JpegCodec ( Tiff tif, Compression scheme, string name ) : System
tif Tiff
scheme Compression
name string
Результат System

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

Performs any actions after encoding required by the codec.
PostEncode is called after encoding and can be used to release any external resources needed during encoding.
public PostEncode ( ) : bool
Результат bool

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

Prepares the decoder part of the codec for a decoding.
PreDecode is called after SetupDecode and before decoding.
public PreDecode ( short plane ) : bool
plane short The zero-based sample plane index.
Результат bool

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

Prepares the encoder part of the codec for a encoding.
PreEncode is called after SetupEncode and before encoding.
public PreEncode ( short plane ) : bool
plane short The zero-based sample plane index.
Результат bool

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

Setups the decoder part of the codec.
SetupDecode is called once before PreDecode.
public SetupDecode ( ) : bool
Результат bool

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

Setups the encoder part of the codec.
SetupEncode is called once before PreEncode.
public SetupEncode ( ) : bool
Результат bool