本文整理汇总了C#中jpeg_decompress_struct类的典型用法代码示例。如果您正苦于以下问题:C# jpeg_decompress_struct类的具体用法?C# jpeg_decompress_struct怎么用?C# jpeg_decompress_struct使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
jpeg_decompress_struct类属于命名空间,在下文中一共展示了jpeg_decompress_struct类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: jpeg_d_coef_controller
public jpeg_d_coef_controller(jpeg_decompress_struct cinfo, bool need_full_buffer)
{
m_cinfo = cinfo;
/* Create the coefficient buffer. */
if (need_full_buffer)
{
/* Allocate a full-image virtual array for each component, */
/* padded to a multiple of samp_factor DCT blocks in each direction. */
/* Note we ask for a pre-zeroed array. */
for (int ci = 0; ci < cinfo.m_num_components; ci++)
{
m_whole_image[ci] = jpeg_common_struct.CreateBlocksArray(
JpegUtils.jround_up(cinfo.Comp_info[ci].Width_in_blocks, cinfo.Comp_info[ci].H_samp_factor),
JpegUtils.jround_up(cinfo.Comp_info[ci].height_in_blocks, cinfo.Comp_info[ci].V_samp_factor));
m_whole_image[ci].ErrorProcessor = cinfo;
}
m_useDummyConsumeData = false;
m_decompressor = DecompressorType.Ordinary;
m_coef_arrays = m_whole_image; /* link to virtual arrays */
}
else
{
/* We only need a single-MCU buffer. */
for (int i = 0; i < JpegConstants.D_MAX_BLOCKS_IN_MCU; i++)
m_MCU_buffer[i] = new JBLOCK();
m_useDummyConsumeData = true;
m_decompressor = DecompressorType.OnePass;
m_coef_arrays = null; /* flag for no virtual arrays */
}
}
开发者ID:prepare,项目名称:HTML-Renderer,代码行数:33,代码来源:jpeg_d_coef_controller.cs
示例2: jpeg_d_post_controller
private int m_next_row; /* index of next row to fill/empty in strip */
/// <summary>
/// Initialize postprocessing controller.
/// </summary>
public jpeg_d_post_controller(jpeg_decompress_struct cinfo, bool need_full_buffer)
{
m_cinfo = cinfo;
/* Create the quantization buffer, if needed */
if (cinfo.m_quantize_colors)
{
/* The buffer strip height is max_v_samp_factor, which is typically
* an efficient number of rows for upsampling to return.
* (In the presence of output rescaling, we might want to be smarter?)
*/
m_strip_height = cinfo.m_max_v_samp_factor;
if (need_full_buffer)
{
/* Two-pass color quantization: need full-image storage. */
/* We round up the number of rows to a multiple of the strip height. */
m_whole_image = jpeg_common_struct.CreateSamplesArray(
cinfo.m_output_width * cinfo.m_out_color_components,
JpegUtils.jround_up(cinfo.m_output_height, m_strip_height));
m_whole_image.ErrorProcessor = cinfo;
}
else
{
/* One-pass color quantization: just make a strip buffer. */
m_buffer = jpeg_common_struct.AllocJpegSamples(
cinfo.m_output_width * cinfo.m_out_color_components, m_strip_height);
}
}
}
开发者ID:prepare,项目名称:HTML-Renderer,代码行数:35,代码来源:jpeg_d_post_controller.cs
示例3: savable_state
private savable_state m_saved = new savable_state(); /* Other state at start of MCU */
#endregion Fields
#region Constructors
public huff_entropy_decoder(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
/* Mark tables unallocated */
for (int i = 0; i < JpegConstants.NUM_HUFF_TBLS; i++)
m_dc_derived_tbls[i] = m_ac_derived_tbls[i] = null;
}
开发者ID:niken0793,项目名称:FacebookImageUpload,代码行数:14,代码来源:huff_entropy_decoder.cs
示例4: jpeg_input_controller
private bool m_eoi_reached; /* True when EOI has been consumed */
/// <summary>
/// Initialize the input controller module.
/// This is called only once, when the decompression object is created.
/// </summary>
public jpeg_input_controller(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
/* Initialize state: can't use reset_input_controller since we don't
* want to try to reset other modules yet.
*/
m_inheaders = true;
}
开发者ID:lygroup,项目名称:libjpeg.net,代码行数:15,代码来源:jpeg_input_controller.cs
示例5: savable_state
private savable_state m_saved = new savable_state(); /* Other state at start of MCU */
#endregion Fields
#region Constructors
public phuff_entropy_decoder(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
/* Mark derived tables unallocated */
for (int i = 0; i < JpegConstants.NUM_HUFF_TBLS; i++)
m_derived_tbls[i] = null;
/* Create progression status table */
cinfo.m_coef_bits = new int[cinfo.m_num_components][];
for (int i = 0; i < cinfo.m_num_components; i++)
cinfo.m_coef_bits[i] = new int[JpegConstants.DCTSIZE2];
for (int ci = 0; ci < cinfo.m_num_components; ci++)
{
for (int i = 0; i < JpegConstants.DCTSIZE2; i++)
cinfo.m_coef_bits[ci][i] = -1;
}
}
开发者ID:joaonlopes,项目名称:ThumbnailCreator,代码行数:25,代码来源:phuff_entropy_decoder.cs
示例6: my_merged_upsampler
private int m_rows_to_go; /* counts rows remaining in image */
public my_merged_upsampler(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
m_need_context_rows = false;
m_out_row_width = cinfo.m_output_width * cinfo.m_out_color_components;
if (cinfo.m_max_v_samp_factor == 2)
{
m_use_2v_upsample = true;
/* Allocate a spare row buffer */
m_spare_row = new byte[m_out_row_width];
}
else
{
m_use_2v_upsample = false;
}
build_ycc_rgb_table();
}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:22,代码来源:my_merged_upsampler.cs
示例7: jpeg_marker_reader
private int m_bytes_read; /* data bytes read so far in marker */
/* Note: cur_marker is not linked into marker_list until it's all read. */
/// <summary>
/// Initialize the marker reader module.
/// This is called only once, when the decompression object is created.
/// </summary>
public jpeg_marker_reader(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
/* Initialize COM/APPn processing.
* By default, we examine and then discard APP0 and APP14,
* but simply discard COM and all other APPn.
*/
m_process_COM = skip_variable;
for (int i = 0; i < 16; i++)
{
m_process_APPn[i] = skip_variable;
m_length_limit_APPn[i] = 0;
}
m_process_APPn[0] = get_interesting_appn;
m_process_APPn[14] = get_interesting_appn;
/* Reset marker processing state */
reset_marker_reader();
}
开发者ID:ChillyFlashER,项目名称:Nine.Imaging,代码行数:29,代码来源:jpeg_marker_reader.cs
示例8: my_source_mgr
private bool m_start_of_file; /* have we gotten any data yet? */
/// <summary>
/// Initialize source - called by jpeg_read_header
/// before any data is actually read.
/// </summary>
public my_source_mgr(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
m_buffer = new byte[INPUT_BUF_SIZE];
}
开发者ID:ChillyFlashER,项目名称:Nine.Imaging,代码行数:11,代码来源:my_source_mgr.cs
示例9: my_2pass_cquantizer
private int[] m_error_limiter; /* table for clamping the applied error */
/// <summary>
/// Module initialization routine for 2-pass color quantization.
/// </summary>
public my_2pass_cquantizer(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
/* Make sure jdmaster didn't give me a case I can't handle */
if (cinfo.m_out_color_components != 3)
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_NOTIMPL);
/* Allocate the histogram/inverse colormap storage */
m_histogram = new ushort[HIST_C0_ELEMS][];
for (int i = 0; i < HIST_C0_ELEMS; i++)
m_histogram[i] = new ushort[HIST_C1_ELEMS * HIST_C2_ELEMS];
m_needs_zeroed = true; /* histogram is garbage now */
/* Allocate storage for the completed colormap, if required.
* We do this now since it is FAR storage and may affect
* the memory manager's space calculations.
*/
if (cinfo.m_enable_2pass_quant)
{
/* Make sure color count is acceptable */
int desired_local = cinfo.m_desired_number_of_colors;
/* Lower bound on # of colors ... somewhat arbitrary as long as > 0 */
if (desired_local < 8)
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_QUANT_FEW_COLORS, 8);
/* Make sure colormap indexes can be represented by JSAMPLEs */
if (desired_local > MAXNUMCOLORS)
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_QUANT_MANY_COLORS, MAXNUMCOLORS);
m_sv_colormap = jpeg_common_struct.AllocJpegSamples(desired_local, 3);
m_desired = desired_local;
}
/* Only F-S dithering or no dithering is supported. */
/* If user asks for ordered dither, give him F-S. */
if (cinfo.m_dither_mode != J_DITHER_MODE.JDITHER_NONE)
cinfo.m_dither_mode = J_DITHER_MODE.JDITHER_FS;
/* Allocate Floyd-Steinberg workspace if necessary.
* This isn't really needed until pass 2, but again it is FAR storage.
* Although we will cope with a later change in dither_mode,
* we do not promise to honor max_memory_to_use if dither_mode changes.
*/
if (cinfo.m_dither_mode == J_DITHER_MODE.JDITHER_FS)
{
m_fserrors = new short[(cinfo.m_output_width + 2) * 3];
/* Might as well create the error-limiting table too. */
init_error_limit();
}
}
开发者ID:dronab,项目名称:libtiff.net,代码行数:59,代码来源:my_2pass_cquantizer.cs
示例10: term_source
// Terminate an input source.
private static void term_source(ref jpeg_decompress_struct cinfo)
{
// Nothing to do here.
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:5,代码来源:JpegLib.cs
示例11: fill_input_buffer_type
// Convert a stream into a source manager.
public static void StreamToSourceManager
(ref jpeg_decompress_struct cinfo, Stream stream,
byte[] prime, int primeLen)
{
// Allocate a state structure and store it in "cinfo".
IntPtr buf = Marshal.AllocHGlobal(4096);
StreamState state = new StreamState();
state.buf = buf;
state.buffer = new byte [4096];
state.stream = stream;
cinfo.client_data = (IntPtr)(GCHandle.Alloc(state));
// We prime the input buffer with the JPEG magic number
// if some higher-level process has already read it.
int len;
if(prime != null)
{
len = primeLen;
Marshal.Copy(prime, 0, buf, len);
}
else
{
len = 0;
}
// Create the managed version of "jpeg_source_mgr".
jpeg_source_mgr mgr = new jpeg_source_mgr();
mgr.next_input_byte = buf;
mgr.bytes_in_buffer = (size_t)len;
mgr.init_source = new init_source_type(init_source);
mgr.fill_input_buffer =
new fill_input_buffer_type(fill_input_buffer);
mgr.skip_input_data =
new skip_input_data_type(skip_input_data);
mgr.resync_to_restart =
new resync_to_restart_type(jpeg_resync_to_restart);
mgr.term_source =
new term_source_type(term_source);
// Convert it into the unmanaged version and store it.
#if __CSCC__
IntPtr umgr = Marshal.AllocHGlobal(sizeof(jpeg_source_mgr));
Marshal.StructureToPtr(mgr, umgr, false);
cinfo.src = (jpeg_source_mgr *)umgr;
#endif
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:47,代码来源:JpegLib.cs
示例12: IntPtr
// Skip data in an input stream.
private static void skip_input_data
(ref jpeg_decompress_struct cinfo, Long num_bytes)
{
#if __CSCC__
jpeg_source_mgr *src = cinfo.src;
int num = (int)num_bytes;
if(num > 0)
{
while(num > (int)(src->bytes_in_buffer))
{
num -= (int)(src->bytes_in_buffer);
fill_input_buffer(ref cinfo);
}
src->next_input_byte =
new IntPtr((src->next_input_byte.ToInt64()) + num);
src->bytes_in_buffer =
(size_t)(((int)(src->bytes_in_buffer)) - num);
}
#endif
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:21,代码来源:JpegLib.cs
示例13: my_upsampler
public my_upsampler(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
m_need_context_rows = false; /* until we find out differently */
if (cinfo.m_CCIR601_sampling) /* this isn't supported */
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_CCIR601_NOTIMPL);
/* jpeg_d_main_controller doesn't support context rows when min_DCT_scaled_size = 1,
* so don't ask for it.
*/
bool do_fancy = cinfo.m_do_fancy_upsampling && cinfo.m_min_DCT_scaled_size > 1;
/* Verify we can handle the sampling factors, select per-component methods,
* and create storage as needed.
*/
for (int ci = 0; ci < cinfo.m_num_components; ci++)
{
jpeg_component_info componentInfo = cinfo.Comp_info[ci];
/* Compute size of an "input group" after IDCT scaling. This many samples
* are to be converted to max_h_samp_factor * max_v_samp_factor pixels.
*/
int h_in_group = (componentInfo.H_samp_factor * componentInfo.DCT_scaled_size) / cinfo.m_min_DCT_scaled_size;
int v_in_group = (componentInfo.V_samp_factor * componentInfo.DCT_scaled_size) / cinfo.m_min_DCT_scaled_size;
int h_out_group = cinfo.m_max_h_samp_factor;
int v_out_group = cinfo.m_max_v_samp_factor;
/* save for use later */
m_rowgroup_height[ci] = v_in_group;
bool need_buffer = true;
if (!componentInfo.component_needed)
{
/* Don't bother to upsample an uninteresting component. */
m_upsampleMethods[ci] = ComponentUpsampler.noop_upsampler;
need_buffer = false;
}
else if (h_in_group == h_out_group && v_in_group == v_out_group)
{
/* Fullsize components can be processed without any work. */
m_upsampleMethods[ci] = ComponentUpsampler.fullsize_upsampler;
need_buffer = false;
}
else if (h_in_group * 2 == h_out_group && v_in_group == v_out_group)
{
/* Special cases for 2h1v upsampling */
if (do_fancy && componentInfo.downsampled_width > 2)
m_upsampleMethods[ci] = ComponentUpsampler.h2v1_fancy_upsampler;
else
m_upsampleMethods[ci] = ComponentUpsampler.h2v1_upsampler;
}
else if (h_in_group * 2 == h_out_group && v_in_group * 2 == v_out_group)
{
/* Special cases for 2h2v upsampling */
if (do_fancy && componentInfo.downsampled_width > 2)
{
m_upsampleMethods[ci] = ComponentUpsampler.h2v2_fancy_upsampler;
m_need_context_rows = true;
}
else
{
m_upsampleMethods[ci] = ComponentUpsampler.h2v2_upsampler;
}
}
else if ((h_out_group % h_in_group) == 0 && (v_out_group % v_in_group) == 0)
{
/* Generic integral-factors upsampling method */
m_upsampleMethods[ci] = ComponentUpsampler.int_upsampler;
m_h_expand[ci] = (byte) (h_out_group / h_in_group);
m_v_expand[ci] = (byte) (v_out_group / v_in_group);
}
else
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_FRACT_SAMPLE_NOTIMPL);
if (need_buffer)
{
ComponentBuffer cb = new ComponentBuffer();
cb.SetBuffer(jpeg_common_struct.AllocJpegSamples(JpegUtils.jround_up(cinfo.m_output_width,
cinfo.m_max_h_samp_factor), cinfo.m_max_v_samp_factor), null, 0);
m_color_buf[ci] = cb;
}
}
}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:84,代码来源:my_upsampler.cs
示例14: examine_app14
/// <summary>
/// Examine first few bytes from an APP14.
/// Take appropriate action if it is an Adobe marker.
/// datalen is # of bytes at data[], remaining is length of rest of marker data.
/// </summary>
private static void examine_app14(jpeg_decompress_struct cinfo, byte[] data, int datalen, int remaining)
{
if (datalen >= APP14_DATA_LEN &&
data[0] == 0x41 &&
data[1] == 0x64 &&
data[2] == 0x6F &&
data[3] == 0x62 &&
data[4] == 0x65)
{
/* Found Adobe APP14 marker */
int version = (data[5] << 8) + data[6];
int flags0 = (data[7] << 8) + data[8];
int flags1 = (data[9] << 8) + data[10];
int transform = data[11];
cinfo.TRACEMS(1, J_MESSAGE_CODE.JTRC_ADOBE, version, flags0, flags1, transform);
cinfo.m_saw_Adobe_marker = true;
cinfo.m_Adobe_transform = (byte) transform;
}
else
{
/* Start of APP14 does not match "Adobe", or too short */
cinfo.TRACEMS(1, J_MESSAGE_CODE.JTRC_APP14, datalen + remaining);
}
}
开发者ID:ChillyFlashER,项目名称:Nine.Imaging,代码行数:29,代码来源:jpeg_marker_reader.cs
示例15: get_interesting_appn
/// <summary>
/// Process an APP0 or APP14 marker without saving it
/// </summary>
private static bool get_interesting_appn(jpeg_decompress_struct cinfo)
{
int length;
if (!cinfo.m_src.GetTwoBytes(out length))
return false;
length -= 2;
/* get the interesting part of the marker data */
int numtoread = 0;
if (length >= APPN_DATA_LEN)
numtoread = APPN_DATA_LEN;
else if (length > 0)
numtoread = length;
byte[] b = new byte[APPN_DATA_LEN];
for (int i = 0; i < numtoread; i++)
{
int temp = 0;
if (!cinfo.m_src.GetByte(out temp))
return false;
b[i] = (byte) temp;
}
length -= numtoread;
/* process it */
switch ((JPEG_MARKER)cinfo.m_unread_marker)
{
case JPEG_MARKER.APP0:
examine_app0(cinfo, b, numtoread, length);
break;
case JPEG_MARKER.APP14:
examine_app14(cinfo, b, numtoread, length);
break;
default:
/* can't get here unless jpeg_save_markers chooses wrong processor */
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_UNKNOWN_MARKER, cinfo.m_unread_marker);
break;
}
/* skip any remaining data -- could be lots */
if (length > 0)
cinfo.m_src.skip_input_data(length);
return true;
}
开发者ID:ChillyFlashER,项目名称:Nine.Imaging,代码行数:51,代码来源:jpeg_marker_reader.cs
示例16: jpeg_set_marker_processor
/// <summary>
/// Install a special processing method for COM or APPn markers.
/// </summary>
public void jpeg_set_marker_processor(int marker_code, jpeg_decompress_struct.jpeg_marker_parser_method routine)
{
if (marker_code == (int)JPEG_MARKER.COM)
m_process_COM = routine;
else if (marker_code >= (int)JPEG_MARKER.APP0 && marker_code <= (int)JPEG_MARKER.APP15)
m_process_APPn[marker_code - (int)JPEG_MARKER.APP0] = routine;
else
m_cinfo.ERREXIT(J_MESSAGE_CODE.JERR_UNKNOWN_MARKER, marker_code);
}
开发者ID:ChillyFlashER,项目名称:Nine.Imaging,代码行数:12,代码来源:jpeg_marker_reader.cs
示例17: FreeSourceManager
// Free a source manager.
public static void FreeSourceManager(ref jpeg_decompress_struct cinfo)
{
GCHandle handle = (GCHandle)(cinfo.client_data);
StreamState state = (StreamState)(handle.Target);
Marshal.FreeHGlobal(state.buf);
handle.Free();
Marshal.FreeHGlobal((IntPtr)(cinfo.src));
cinfo.client_data = IntPtr.Zero;
cinfo.src = null;
}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:11,代码来源:JpegLib.cs
示例18: jpeg_color_deconverter
private int[] m_Cb_g_tab; /* => table for Cb to G conversion */
/// <summary>
/// Module initialization routine for output colorspace conversion.
/// </summary>
public jpeg_color_deconverter(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
/* Make sure num_components agrees with jpeg_color_space */
switch (cinfo.m_jpeg_color_space)
{
case J_COLOR_SPACE.JCS_GRAYSCALE:
if (cinfo.m_num_components != 1)
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_J_COLORSPACE);
break;
case J_COLOR_SPACE.JCS_RGB:
case J_COLOR_SPACE.JCS_YCbCr:
if (cinfo.m_num_components != 3)
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_J_COLORSPACE);
break;
case J_COLOR_SPACE.JCS_CMYK:
case J_COLOR_SPACE.JCS_YCCK:
if (cinfo.m_num_components != 4)
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_J_COLORSPACE);
break;
default:
/* JCS_UNKNOWN can be anything */
if (cinfo.m_num_components < 1)
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_BAD_J_COLORSPACE);
break;
}
/* Set out_color_components and conversion method based on requested space.
* Also clear the component_needed flags for any unused components,
* so that earlier pipeline stages can avoid useless computation.
*/
switch (cinfo.m_out_color_space)
{
case J_COLOR_SPACE.JCS_GRAYSCALE:
cinfo.m_out_color_components = 1;
if (cinfo.m_jpeg_color_space == J_COLOR_SPACE.JCS_GRAYSCALE || cinfo.m_jpeg_color_space == J_COLOR_SPACE.JCS_YCbCr)
{
m_converter = ColorConverter.grayscale_converter;
/* For color->grayscale conversion, only the Y (0) component is needed */
for (int ci = 1; ci < cinfo.m_num_components; ci++)
cinfo.Comp_info[ci].component_needed = false;
}
else
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_CONVERSION_NOTIMPL);
break;
case J_COLOR_SPACE.JCS_RGB:
cinfo.m_out_color_components = JpegConstants.RGB_PIXELSIZE;
if (cinfo.m_jpeg_color_space == J_COLOR_SPACE.JCS_YCbCr)
{
m_converter = ColorConverter.ycc_rgb_converter;
build_ycc_rgb_table();
}
else if (cinfo.m_jpeg_color_space == J_COLOR_SPACE.JCS_GRAYSCALE)
m_converter = ColorConverter.gray_rgb_converter;
else if (cinfo.m_jpeg_color_space == J_COLOR_SPACE.JCS_RGB)
m_converter = ColorConverter.null_converter;
else
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_CONVERSION_NOTIMPL);
break;
case J_COLOR_SPACE.JCS_CMYK:
cinfo.m_out_color_components = 4;
if (cinfo.m_jpeg_color_space == J_COLOR_SPACE.JCS_YCCK)
{
m_converter = ColorConverter.ycck_cmyk_converter;
build_ycc_rgb_table();
}
else if (cinfo.m_jpeg_color_space == J_COLOR_SPACE.JCS_CMYK)
m_converter = ColorConverter.null_converter;
else
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_CONVERSION_NOTIMPL);
break;
default:
/* Permit null conversion to same output space */
if (cinfo.m_out_color_space == cinfo.m_jpeg_color_space)
{
cinfo.m_out_color_components = cinfo.m_num_components;
m_converter = ColorConverter.null_converter;
}
else
{
/* unsupported non-null conversion */
cinfo.ERREXIT(J_MESSAGE_CODE.JERR_CONVERSION_NOTIMPL);
}
break;
}
if (cinfo.m_quantize_colors)
//.........这里部分代码省略.........
开发者ID:Ravivishnubhotla,项目名称:libtiff.net,代码行数:101,代码来源:jpeg_color_deconverter.cs
示例19: huff_entropy_decoder
public huff_entropy_decoder(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
finish_pass = finish_pass_huff;
if (m_cinfo.m_progressive_mode)
{
/* Create progression status table */
cinfo.m_coef_bits = new int[cinfo.m_num_components][];
for (int i = 0; i < cinfo.m_num_components; i++)
cinfo.m_coef_bits[i] = new int[JpegConstants.DCTSIZE2];
for (int ci = 0; ci < cinfo.m_num_components; ci++)
{
for (int i = 0; i < JpegConstants.DCTSIZE2; i++)
cinfo.m_coef_bits[ci][i] = -1;
}
/* Mark derived tables unallocated */
for (int i = 0; i < JpegConstants.NUM_HUFF_TBLS; i++)
{
derived_tbls[i] = null;
}
}
else
{
/* Mark tables unallocated */
for (int i = 0; i < JpegConstants.NUM_HUFF_TBLS; i++)
{
m_dc_derived_tbls[i] = null;
m_ac_derived_tbls[i] = null;
}
}
}
开发者ID:prepare,项目名称:HTML-Renderer,代码行数:35,代码来源:huff_entropy_decoder.cs
示例20: jpeg_decomp_master
public jpeg_decomp_master(jpeg_decompress_struct cinfo)
{
m_cinfo = cinfo;
master_selection();
}
开发者ID:XiBeichuan,项目名称:hydronumerics,代码行数:5,代码来源:jpeg_decomp_master.cs
注:本文中的jpeg_decompress_struct类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论