📄 jpeglib.h
字号:
* is good enough for all known systems. * (If your compiler itself needs names to be unique in less than 15 * characters, you are out of luck. Get a better compiler.) */#ifdef NEED_SHORT_EXTERNAL_NAMES#define jpeg_std_error jStdError#define jpeg_CreateCompress jCreaCompress#define jpeg_CreateDecompress jCreaDecompress#define jpeg_destroy_compress jDestCompress#define jpeg_destroy_decompress jDestDecompress#define jpeg_stdio_dest jStdDest#define jpeg_stdio_src jStdSrc#define jpeg_set_defaults jSetDefaults#define jpeg_set_colorspace jSetColorspace#define jpeg_default_colorspace jDefColorspace#define jpeg_set_quality jSetQuality#define jpeg_set_linear_quality jSetLQuality#define jpeg_add_quant_table jAddQuantTable#define jpeg_quality_scaling jQualityScaling#define jpeg_simple_progression jSimProgress#define jpeg_suppress_tables jSuppressTables#define jpeg_alloc_quant_table jAlcQTable#define jpeg_alloc_huff_table jAlcHTable#define jpeg_start_compress jStrtCompress#define jpeg_write_scanlines jWrtScanlines#define jpeg_finish_compress jFinCompress#define jpeg_write_raw_data jWrtRawData#define jpeg_write_marker jWrtMarker#define jpeg_write_m_header jWrtMHeader#define jpeg_write_m_byte jWrtMByte#define jpeg_write_tables jWrtTables#define jpeg_read_header jReadHeader#define jpeg_start_decompress jStrtDecompress#define jpeg_read_scanlines jReadScanlines#define jpeg_finish_decompress jFinDecompress#define jpeg_read_raw_data jReadRawData#define jpeg_has_multiple_scans jHasMultScn#define jpeg_start_output jStrtOutput#define jpeg_finish_output jFinOutput#define jpeg_input_complete jInComplete#define jpeg_new_colormap jNewCMap#define jpeg_consume_input jConsumeInput#define jpeg_calc_output_dimensions jCalcDimensions#define jpeg_save_markers jSaveMarkers#define jpeg_set_marker_processor jSetMarker#define jpeg_read_coefficients jReadCoefs#define jpeg_write_coefficients jWrtCoefs#define jpeg_copy_critical_parameters jCopyCrit#define jpeg_abort_compress jAbrtCompress#define jpeg_abort_decompress jAbrtDecompress#define jpeg_abort jAbort#define jpeg_destroy jDestroy#define jpeg_resync_to_restart jResyncRestart#endif /* NEED_SHORT_EXTERNAL_NAMES *//* Default error-management setup */EXTERN(struct jpeg_error_mgr *) jpeg_std_error JPP((struct jpeg_error_mgr * err));/* Initialization of JPEG compression objects. * jpeg_create_compress() and jpeg_create_decompress() are the exported * names that applications should call. These expand to calls on * jpeg_CreateCompress and jpeg_CreateDecompress with additional information * passed for version mismatch checking. * NB: you must set up the error-manager BEFORE calling jpeg_create_xxx. */#define jpeg_create_compress(cinfo) \ jpeg_CreateCompress((cinfo), JPEG_LIB_VERSION, \ (size_t) sizeof(struct jpeg_compress_struct))#define jpeg_create_decompress(cinfo) \ jpeg_CreateDecompress((cinfo), JPEG_LIB_VERSION, \ (size_t) sizeof(struct jpeg_decompress_struct))EXTERN(void) jpeg_CreateCompress JPP((j_compress_ptr cinfo, int version, size_t structsize));EXTERN(void) jpeg_CreateDecompress JPP((j_decompress_ptr cinfo, int version, size_t structsize));/* Destruction of JPEG compression objects */EXTERN(void) jpeg_destroy_compress JPP((j_compress_ptr cinfo));EXTERN(void) jpeg_destroy_decompress JPP((j_decompress_ptr cinfo));/* Standard data source and destination managers: stdio streams. *//* Caller is responsible for opening the file before and closing after. */EXTERN(void) jpeg_stdio_dest JPP((j_compress_ptr cinfo, FILE * outfile));EXTERN(void) jpeg_stdio_src JPP((j_decompress_ptr cinfo, FILE * infile));/* Default parameter setup for compression */EXTERN(void) jpeg_set_defaults JPP((j_compress_ptr cinfo));/* Compression parameter setup aids */EXTERN(void) jpeg_set_colorspace JPP((j_compress_ptr cinfo, J_COLOR_SPACE colorspace));EXTERN(void) jpeg_default_colorspace JPP((j_compress_ptr cinfo));EXTERN(void) jpeg_set_quality JPP((j_compress_ptr cinfo, int quality, boolean force_baseline));EXTERN(void) jpeg_set_linear_quality JPP((j_compress_ptr cinfo, int scale_factor, boolean force_baseline));EXTERN(void) jpeg_add_quant_table JPP((j_compress_ptr cinfo, int which_tbl, const unsigned int *basic_table, int scale_factor, boolean force_baseline));EXTERN(int) jpeg_quality_scaling JPP((int quality));EXTERN(void) jpeg_simple_progression JPP((j_compress_ptr cinfo));EXTERN(void) jpeg_suppress_tables JPP((j_compress_ptr cinfo, boolean suppress));EXTERN(JQUANT_TBL *) jpeg_alloc_quant_table JPP((j_common_ptr cinfo));EXTERN(JHUFF_TBL *) jpeg_alloc_huff_table JPP((j_common_ptr cinfo));/* Main entry points for compression */EXTERN(void) jpeg_start_compress JPP((j_compress_ptr cinfo, boolean write_all_tables));EXTERN(JDIMENSION) jpeg_write_scanlines JPP((j_compress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION num_lines));EXTERN(void) jpeg_finish_compress JPP((j_compress_ptr cinfo));/* Replaces jpeg_write_scanlines when writing raw downsampled data. */EXTERN(JDIMENSION) jpeg_write_raw_data JPP((j_compress_ptr cinfo, JSAMPIMAGE data, JDIMENSION num_lines));/* Write a special marker. See libjpeg.doc concerning safe usage. */EXTERN(void) jpeg_write_marker JPP((j_compress_ptr cinfo, int marker, const JOCTET * dataptr, unsigned int datalen));/* Same, but piecemeal. */EXTERN(void) jpeg_write_m_header JPP((j_compress_ptr cinfo, int marker, unsigned int datalen));EXTERN(void) jpeg_write_m_byte JPP((j_compress_ptr cinfo, int val));/* Alternate compression function: just write an abbreviated table file */EXTERN(void) jpeg_write_tables JPP((j_compress_ptr cinfo));/* Decompression startup: read start of JPEG datastream to see what's there */EXTERN(int) jpeg_read_header JPP((j_decompress_ptr cinfo, boolean require_image));/* Return value is one of: */#define JPEG_SUSPENDED 0 /* Suspended due to lack of input data */#define JPEG_HEADER_OK 1 /* Found valid image datastream */#define JPEG_HEADER_TABLES_ONLY 2 /* Found valid table-specs-only datastream *//* If you pass require_image = TRUE (normal case), you need not check for * a TABLES_ONLY return code; an abbreviated file will cause an error exit. * JPEG_SUSPENDED is only possible if you use a data source module that can * give a suspension return (the stdio source module doesn't). *//* Main entry points for decompression */EXTERN(boolean) jpeg_start_decompress JPP((j_decompress_ptr cinfo));EXTERN(JDIMENSION) jpeg_read_scanlines JPP((j_decompress_ptr cinfo, JSAMPARRAY scanlines, JDIMENSION max_lines));EXTERN(boolean) jpeg_finish_decompress JPP((j_decompress_ptr cinfo));/* Replaces jpeg_read_scanlines when reading raw downsampled data. */EXTERN(JDIMENSION) jpeg_read_raw_data JPP((j_decompress_ptr cinfo, JSAMPIMAGE data, JDIMENSION max_lines));/* Additional entry points for buffered-image mode. */EXTERN(boolean) jpeg_has_multiple_scans JPP((j_decompress_ptr cinfo));EXTERN(boolean) jpeg_start_output JPP((j_decompress_ptr cinfo, int scan_number));EXTERN(boolean) jpeg_finish_output JPP((j_decompress_ptr cinfo));EXTERN(boolean) jpeg_input_complete JPP((j_decompress_ptr cinfo));EXTERN(void) jpeg_new_colormap JPP((j_decompress_ptr cinfo));EXTERN(int) jpeg_consume_input JPP((j_decompress_ptr cinfo));/* Return value is one of: *//* #define JPEG_SUSPENDED 0 Suspended due to lack of input data */#define JPEG_REACHED_SOS 1 /* Reached start of new scan */#define JPEG_REACHED_EOI 2 /* Reached end of image */#define JPEG_ROW_COMPLETED 3 /* Completed one iMCU row */#define JPEG_SCAN_COMPLETED 4 /* Completed last iMCU row of a scan *//* Precalculate output dimensions for current decompression parameters. */EXTERN(void) jpeg_calc_output_dimensions JPP((j_decompress_ptr cinfo));/* Control saving of COM and APPn markers into marker_list. */EXTERN(void) jpeg_save_markers JPP((j_decompress_ptr cinfo, int marker_code, unsigned int length_limit));/* Install a special processing method for COM or APPn markers. */EXTERN(void) jpeg_set_marker_processor JPP((j_decompress_ptr cinfo, int marker_code, jpeg_marker_parser_method routine));/* Read or write raw DCT coefficients --- useful for lossless transcoding. */EXTERN(jvirt_barray_ptr *) jpeg_read_coefficients JPP((j_decompress_ptr cinfo));EXTERN(void) jpeg_write_coefficients JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));EXTERN(void) jpeg_copy_critical_parameters JPP((j_decompress_ptr srcinfo, j_compress_ptr dstinfo));/* If you choose to abort compression or decompression before completing * jpeg_finish_(de)compress, then you need to clean up to release memory, * temporary files, etc. You can just call jpeg_destroy_(de)compress * if you're done with the JPEG object, but if you want to clean it up and * reuse it, call this: */EXTERN(void) jpeg_abort_compress JPP((j_compress_ptr cinfo));EXTERN(void) jpeg_abort_decompress JPP((j_decompress_ptr cinfo));/* Generic versions of jpeg_abort and jpeg_destroy that work on either * flavor of JPEG object. These may be more convenient in some places. */EXTERN(void) jpeg_abort JPP((j_common_ptr cinfo));EXTERN(void) jpeg_destroy JPP((j_common_ptr cinfo));/* Default restart-marker-resync procedure for use by data source modules */EXTERN(boolean) jpeg_resync_to_restart JPP((j_decompress_ptr cinfo, int desired));/* These marker codes are exported since applications and data source modules * are likely to want to use them. */#define JPEG_RST0 0xD0 /* RST0 marker code */#define JPEG_EOI 0xD9 /* EOI marker code */#define JPEG_APP0 0xE0 /* APP0 marker code */#define JPEG_COM 0xFE /* COM marker code *//* If we have a brain-damaged compiler that emits warnings (or worse, errors) * for structure definitions that are never filled in, keep it quiet by * supplying dummy definitions for the various substructures. */#ifdef INCOMPLETE_TYPES_BROKEN#ifndef JPEG_INTERNALS /* will be defined in jpegint.h */struct jvirt_sarray_control { long dummy; };struct jvirt_barray_control { long dummy; };struct jpeg_comp_master { long dummy; };struct jpeg_c_main_controller { long dummy; };struct jpeg_c_prep_controller { long dummy; };struct jpeg_c_coef_controller { long dummy; };struct jpeg_marker_writer { long dummy; };struct jpeg_color_converter { long dummy; };struct jpeg_downsampler { long dummy; };struct jpeg_forward_dct { long dummy; };struct jpeg_entropy_encoder { long dummy; };struct jpeg_decomp_master { long dummy; };struct jpeg_d_main_controller { long dummy; };struct jpeg_d_coef_controller { long dummy; };struct jpeg_d_post_controller { long dummy; };struct jpeg_input_controller { long dummy; };struct jpeg_marker_reader { long dummy; };struct jpeg_entropy_decoder { long dummy; };struct jpeg_inverse_dct { long dummy; };struct jpeg_upsampler { long dummy; };struct jpeg_color_deconverter { long dummy; };struct jpeg_color_quantizer { long dummy; };#endif /* JPEG_INTERNALS */#endif /* INCOMPLETE_TYPES_BROKEN *//* * The JPEG library modules define JPEG_INTERNALS before including this file. * The internal structure declarations are read only when that is true. * Applications using the library should not include jpegint.h, but may wish * to include jerror.h. */#ifdef JPEG_INTERNALS#include "jpegint.h" /* fetch private declarations */#include "jerror.h" /* fetch error codes too */#endif#endif /* JPEGLIB_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -