C# Class FluxJpeg.Core.JpegHuffmanTable

The JPEGHuffmanTable class represents a Huffman table read from a JPEG image file. The standard JPEG AC and DC chrominance and luminance values are provided as static fields.
Show file Open project: prepare/HTML-Renderer Class Usage Examples

Public Properties

Property Type Description
StdACChrominance JpegHuffmanTable
StdACLuminance JpegHuffmanTable
StdDCChrominance JpegHuffmanTable
StdDCLuminance JpegHuffmanTable

Public Methods

Method Description
JpegHuffmanTable ( short lengths, short values ) : System

Construct and initialize a Huffman table. Copies are created of the array arguments. lengths[index] stores the number of Huffman values with Huffman codes of length index + 1. The values array stores the Huffman values in order of increasing code length. throws ArgumentException if either parameter is null, if lengths.Length > 16 or values.Length > 256, if any value in length or values is negative, or if the parameters do not describe a valid Huffman table

Private Methods

Method Description
JpegHuffmanTable ( short lengths, short values, bool copy ) : System

Private constructor that avoids unnecessary copying and argument checking.

checkLengths ( short lengths ) : short[]
checkValues ( short values, short lengths ) : short[]

Method Details

JpegHuffmanTable() public method

Construct and initialize a Huffman table. Copies are created of the array arguments. lengths[index] stores the number of Huffman values with Huffman codes of length index + 1. The values array stores the Huffman values in order of increasing code length. throws ArgumentException if either parameter is null, if lengths.Length > 16 or values.Length > 256, if any value in length or values is negative, or if the parameters do not describe a valid Huffman table
public JpegHuffmanTable ( short lengths, short values ) : System
lengths short an array of Huffman code lengths
values short a sorted array of Huffman values
return System

Property Details

StdACChrominance public static property

public static JpegHuffmanTable,FluxJpeg.Core StdACChrominance
return JpegHuffmanTable

StdACLuminance public static property

public static JpegHuffmanTable,FluxJpeg.Core StdACLuminance
return JpegHuffmanTable

StdDCChrominance public static property

public static JpegHuffmanTable,FluxJpeg.Core StdDCChrominance
return JpegHuffmanTable

StdDCLuminance public static property

public static JpegHuffmanTable,FluxJpeg.Core StdDCLuminance
return JpegHuffmanTable