Class JpegFrameEncode
[Guid("2F0C601F-D2C6-468C-ABFA-49495D983ED1")]
public class JpegFrameEncode : ComObject
- Inheritance
-
JpegFrameEncode
Constructors
JpegFrameEncode(nint)
public JpegFrameEncode(nint nativePtr)
Parameters
nativePtr
nint
Methods
GetAcHuffmanTable(int, int, out JpegAcHuffmanTable)
Retrieves a copy of the AC Huffman table for the specified scan and table.
public void GetAcHuffmanTable(int scanIndex, int tableIndex, out JpegAcHuffmanTable acHuffmanTableRef)
Parameters
scanIndex
intThe zero-based index of the scan for which data is retrieved.
tableIndex
intThe index of the AC Huffman table to retrieve.
acHuffmanTableRef
JpegAcHuffmanTableA reference that receives the table data. This parameter must not be
null
.
GetDcHuffmanTable(int, int, out JpegDeviceContextHuffmanTable)
Retrieves a copy of the DC Huffman table for the specified scan and table.
public void GetDcHuffmanTable(int scanIndex, int tableIndex, out JpegDeviceContextHuffmanTable dcHuffmanTableRef)
Parameters
scanIndex
intThe zero-based index of the scan for which data is retrieved.
tableIndex
intThe index of the DC Huffman table to retrieve.
dcHuffmanTableRef
JpegDeviceContextHuffmanTableA reference that receives the table data. This parameter must not be
null
.
GetQuantizationTable(int, int, out JpegQuantizationTable)
Retrieves a copy of the quantization table.
public void GetQuantizationTable(int scanIndex, int tableIndex, out JpegQuantizationTable quantizationTableRef)
Parameters
scanIndex
intThe zero-based index of the scan for which data is retrieved.
tableIndex
intThe index of the quantization table to retrieve.
quantizationTableRef
JpegQuantizationTableA reference that receives the table data. This parameter must not be
null
.
WriteScan(int, byte[])
Writes scan data to a JPEG frame.
public void WriteScan(int scanData, byte[] scanDataRef)
Parameters
scanData
intThe size of the data in the pbScanData parameter.
scanDataRef
byte[]The scan data to write.
Remarks
WriteScan may be called multiple times. Each call appends the scan data specified to any previous scan data. Complete the scan by calling IWICBitmapFrameEncode::Commit.
Any calls to set encoder parameters or image metadata that will appear before the scan data in the resulting JPEG file must be completed before the first call to this method. This includes calls to IWICBitmapFrameEncode::SetColorContexts , IWICBitmapFrameEncode::SetPalette, IWICBitmapFrameEncode::SetPixelFormat, IWICBitmapFrameEncode::SetResolution, and IWICBitmapFrameEncode::SetThumbnail. IWICBitmapFrameEncode::SetSize is required as it has no default value for encoded image size.
Operators
explicit operator JpegFrameEncode(nint)
public static explicit operator JpegFrameEncode(nint nativePtr)
Parameters
nativePtr
nint