?? ijl.h
字號:
JPEGQuantTable rawquanttables[4];
JPEGHuffTable rawhufftables[8];
BYTE HuffIdentifierAC[4];
BYTE HuffIdentifierDC[4];
// Frame specific members.
FRAME jframe;
int needframe;
// SCAN persistent members.
SCAN* jscan;
// State members.
STATE state;
DWORD SawAdobeMarker;
DWORD AdobeXform;
// ROI decoder members.
ENTROPYSTRUCT* rowoffsets;
// Intermediate buffers.
BYTE* MCUBuf;
BYTE tMCUBuf[720*2]; // ???
// Processor detected.
PROCESSOR_TYPE processor_type;
// Test specific members.
DWORD ignoreDCTs;
// Progressive mode members.
int progressive_found;
short* coef_buffer;
} JPEG_PROPERTIES;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: JPEG_CORE_PROPERTIES
//
// Purpose: This is the primary data structure between the IJL and
// the external user. It stores JPEG state information
// and controls the IJL. It is user-modifiable.
//
// See the Developer's Guide for details on appropriate usage.
//
// Context: Used by all low-level IJL routines to store
// pseudo-global information.
//
// Fields:
//
// UseJPEGPROPERTIES Set this flag != 0 if you wish to override
// the JPEG_CORE_PROPERTIES "IN" parameters with
// the JPEG_PROPERTIES parameters.
//
// DIBBytes IN: Pointer to buffer of uncompressed data.
// DIBWidth IN: Width of uncompressed data.
// DIBHeight IN: Height of uncompressed data.
// DIBPadBytes IN: Padding (in bytes) at end of each
// row in the uncompressed data.
// DIBChannels IN: Number of components in the
// uncompressed data.
// DIBColor IN: Color space of uncompressed data.
// DIBSubsampling IN: Required to be IJL_NONE.
//
// JPGFile IN: Pointer to file based JPEG.
// JPGBytes IN: Pointer to buffer based JPEG.
// JPGSizeBytes IN: Max buffer size. Used with JPGBytes.
// OUT: Number of compressed bytes written.
// JPGWidth IN: Width of JPEG image.
// OUT: After reading (except READHEADER).
// JPGHeight IN: Height of JPEG image.
// OUT: After reading (except READHEADER).
// JPGChannels IN: Number of components in JPEG image.
// OUT: After reading (except READHEADER).
// JPGColor IN: Color space of JPEG image.
// JPGSubsampling IN: Subsampling of JPEG image.
// OUT: After reading (except READHEADER).
// JPGThumbWidth OUT: JFIF embedded thumbnail width [0-255].
// JPGThumbHeight OUT: JFIF embedded thumbnail height [0-255].
//
// cconversion_reqd OUT: If color conversion done on decode, TRUE.
// upsampling_reqd OUT: If upsampling done on decode, TRUE.
// jquality IN: [0-100] where highest quality is 100.
//
// jprops "Low-Level" IJL data structure.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef struct _JPEG_CORE_PROPERTIES
{
DWORD UseJPEGPROPERTIES; // default = 0
// DIB specific I/O data specifiers.
BYTE* DIBBytes; // default = NULL
DWORD DIBWidth; // default = 0
int DIBHeight; // default = 0
DWORD DIBPadBytes; // default = 0
DWORD DIBChannels; // default = 3
IJL_COLOR DIBColor; // default = IJL_BGR
IJL_DIBSUBSAMPLING DIBSubsampling; // default = IJL_NONE
// JPEG specific I/O data specifiers.
LPTSTR JPGFile; // default = NULL
BYTE* JPGBytes; // default = NULL
DWORD JPGSizeBytes; // default = 0
DWORD JPGWidth; // default = 0
DWORD JPGHeight; // default = 0
DWORD JPGChannels; // default = 3
IJL_COLOR JPGColor; // default = IJL_YCBCR
IJL_JPGSUBSAMPLING JPGSubsampling; // default = IJL_411
DWORD JPGThumbWidth; // default = 0
DWORD JPGThumbHeight; // default = 0
// JPEG conversion properties.
DWORD cconversion_reqd; // default = TRUE
DWORD upsampling_reqd; // default = TRUE
DWORD jquality; // default = 75
// Low-level properties.
JPEG_PROPERTIES jprops;
} JPEG_CORE_PROPERTIES;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJLERR
//
// Purpose: Listing of possible "error" codes returned by the IJL.
//
// See the Developer's Guide for details on appropriate usage.
//
// Context: Used for error checking.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef enum
{
// The following "error" values indicate an "OK" condition.
IJL_OK = 0,
IJL_INTERRUPT_OK = 1,
IJL_ROI_OK = 2,
// The following "error" values indicate an error has occurred.
IJL_EXCEPTION_DETECTED = -1,
IJL_INVALID_ENCODER = -2,
IJL_UNSUPPORTED_SUBSAMPLING = -3,
IJL_UNSUPPORTED_BYTES_PER_PIXEL = -4,
IJL_MEMORY_ERROR = -5,
IJL_BAD_HUFFMAN_TABLE = -6,
IJL_BAD_QUANT_TABLE = -7,
IJL_INVALID_JPEG_PROPERTIES = -8,
IJL_ERR_FILECLOSE = -9,
IJL_INVALID_FILENAME = -10,
IJL_ERROR_EOF = -11,
IJL_PROG_NOT_SUPPORTED = -12,
IJL_ERR_NOT_JPEG = -13,
IJL_ERR_COMP = -14,
IJL_ERR_SOF = -15,
IJL_ERR_DNL = -16,
IJL_ERR_NO_HUF = -17,
IJL_ERR_NO_QUAN = -18,
IJL_ERR_NO_FRAME = -19,
IJL_ERR_MULT_FRAME = -20,
IJL_ERR_DATA = -21,
IJL_ERR_NO_IMAGE = -22,
IJL_FILE_ERROR = -23,
IJL_INTERNAL_ERROR = -24,
IJL_BAD_RST_MARKER = -25,
IJL_THUMBNAIL_DIB_TOO_SMALL = -26,
IJL_THUMBNAIL_DIB_WRONG_COLOR = -27,
IJL_RESERVED = -99
} IJLERR;
/* /////////////////////////////////////////////////////////////////////////
// Function Prototypes (API Calls) //
///////////////////////////////////////////////////////////////////////// */
/*F*
////////////////////////////////////////////////////////////////////////////
// Name: ijlInit
//
// Purpose: Used to initalize the IJL.
//
// See the Developer's Guide for details on appropriate usage.
//
// Context: Always call this before anything else.
// Also, only call this with a new jcprops structure, or
// after calling IJL_Free. Otherwise, dynamically
// allocated memory may be leaked.
//
// Returns: Any IJLERR value. IJL_OK indicates success.
//
// Parameters:
// jcprops Pointer to an externally allocated
// JPEG_CORE_PROPERTIES structure.
//
////////////////////////////////////////////////////////////////////////////
*F*/
IJLAPI(IJLERR, ijlInit, ( JPEG_CORE_PROPERTIES* jcprops ));
/*F*
////////////////////////////////////////////////////////////////////////////
// Name: ijlFree
//
// Purpose: Used to properly close down the IJL.
//
// See the Developer's Guide for details on appropriate usage.
//
// Context: Always call this when done using the IJL to perform
// clean-up of dynamically allocated memory.
// Note, IJL_Init will have to be called to use the
// IJL again.
//
// Returns: Any IJLERR value. IJL_OK indicates success.
//
// Parameters:
// jcprops Pointer to an externally allocated
// JPEG_CORE_PROPERTIES structure.
//
////////////////////////////////////////////////////////////////////////////
*F*/
IJLAPI(IJLERR, ijlFree, ( JPEG_CORE_PROPERTIES* jcprops ));
/*F*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_Read
//
// Purpose: Used to read JPEG data (entropy, or header, or both) into
// a user-supplied buffer (to hold the image data) and/or
// into the JPEG_CORE_PROPERTIES structure (to hold the
// header info).
//
// Context: See the Developer's Guide for a detailed description
// on the use of this function. The jcprops main data
// members are checked for consistency.
//
// Returns: Any IJLERR value. IJL_OK indicates success.
//
// Parameters:
// jcprops Pointer to an externally allocated
// JPEG_CORE_PROPERTIES structure.
// iotype Specifies what type of read operation to perform.
//
////////////////////////////////////////////////////////////////////////////
*F*/
IJLAPI(IJLERR, ijlRead, ( JPEG_CORE_PROPERTIES* jcprops, IJLIOTYPE iotype ));
/*F*
////////////////////////////////////////////////////////////////////////////
// Name: ijlWrite
//
// Purpose: Used to write JPEG data (entropy, or header, or both) into
// a user-supplied buffer (to hold the image data) and/or
// into the JPEG_CORE_PROPERTIES structure (to hold the
// header info).
//
// Context: See the Developer's Guide for a detailed description
// on the use of this function. The jcprops main data
// members are checked for consistency.
//
// Returns: Any IJLERR value. IJL_OK indicates success.
//
// Parameters:
// jcprops Pointer to an externally allocated
// JPEG_CORE_PROPERTIES structure.
// iotype Specifies what type of write operation to perform.
//
////////////////////////////////////////////////////////////////////////////
*F*/
IJLAPI(IJLERR, ijlWrite, ( JPEG_CORE_PROPERTIES* jcprops, IJLIOTYPE iotype ));
/*F*
////////////////////////////////////////////////////////////////////////////
// Name: ijlGetLibVersion
//
// Purpose: To identify the version number of the IJL.
//
// Context: Call to get the IJL version number.
//
// Returns: pointer to IJLibVersion struct
//
// Parameters: none
//
////////////////////////////////////////////////////////////////////////////
*F*/
IJLAPI(const IJLibVersion*, ijlGetLibVersion, (void));
/*F*
////////////////////////////////////////////////////////////////////////////
// Name: ijlErrorStr
//
// Purpose: Gets the string to describe error code.
//
// Context: Is called to get descriptive string on arbitrary IJLERR code.
//
// Returns: pointer to string
//
// Parameters: IJLERR - IJL error code
//
////////////////////////////////////////////////////////////////////////////
*F*/
IJLAPI(const LPCTSTR, ijlErrorStr, (IJLERR code));
#if defined( __cplusplus )
}
#endif
#endif // __IJL_H__
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -