/*M*
//
//
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright (c) 1998 Intel Corporation. All Rights Reserved.
//
//
// File:
// ijl.h
//
// Purpose:
// IJL Common Header File
// This file contains: definitions for data types, data
// structures, error codes, and function prototypes used
// in the Intel(R) JPEG Library (IJL).
//
// Version:
// 1.51
//
*M*/
#ifndef __IJL_H__
#define __IJL_H__
#if defined( __cplusplus )
extern "C" {
#endif
#ifndef IJL_ALL_WARNINGS
#if defined (_WIN32)
#if _MSC_VER >= 1000
/* nonstandard extension used : nameless struct/union */
#pragma warning(disable : 4201)
/* nonstandard extension used : bit field types other than int */
#pragma warning(disable : 4214)
/* unreferenced inline function has been removed */
#pragma warning(disable : 4514)
/* named type definition in parentheses */
#pragma warning(disable : 4115)
#endif /* _MSC_VER >= 1000 */
#endif /* _WIN32 */
#endif /* IJL_ALL_WARNINGS */
#if defined (_WIN32)
#define IJL_STDCALL __stdcall
#else
#define IJL_STDCALL
#endif
/* align struct on 8 bytes boundary */
#if defined (_WIN32)
#pragma pack (8)
#else
#endif
/* /////////////////////////////////////////////////////////////////////////
// Macros/Constants */
/* Size of file I/O buffer (4K). */
#define JBUFSIZE 4096
#if defined (_WIN32)
#define IJL_INT64 __int64
#else
#define IJL_INT64 long long
#endif
#define IJL_UINT64 unsigned IJL_INT64
#ifndef IJLAPI
#ifdef IJL_MSEXPORTS
#define IJLAPI(type,name,arg) \
extern __declspec(dllimport) type IJL_STDCALL name arg
#else
#define IJLAPI(type,name,arg) \
extern type IJL_STDCALL name arg
#endif
#endif
#define IJL_DIB_ALIGN (sizeof(int) - 1)
#define IJL_DIB_UWIDTH(width,nchannels) \
((width) * (nchannels))
#define IJL_DIB_AWIDTH(width,nchannels) \
( ((IJL_DIB_UWIDTH(width,nchannels) + IJL_DIB_ALIGN) & (~IJL_DIB_ALIGN)) )
#define IJL_DIB_PAD_BYTES(width,nchannels) \
( IJL_DIB_AWIDTH(width,nchannels) - IJL_DIB_UWIDTH(width,nchannels) )
#define IJL_DIB_SCALE_SIZE(jpgsize,scale) \
( ((jpgsize) + (scale) - 1) / (scale) )
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJLibVersion
//
// Purpose: Stores library version info.
//
// Context:
//
// Example:
// major - 1
// minor - 0
// build - 1
// Name - "ijl10.dll"
// Version - "1.0.1 Beta1"
// InternalVersion - "1.0.1.1"
// BuildDate - "Sep 22 1998"
// CallConv - "DLL"
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef struct _IJLibVersion
{
int major;
int minor;
int build;
const char* Name;
const char* Version;
const char* InternalVersion;
const char* BuildDate;
const char* CallConv;
} IJLibVersion;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_RECT
//
// Purpose: Keep coordinates for rectangle region of image
//
// Context: Used to specify roi
//
// Fields:
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef struct _IJL_RECT
{
long left;
long top;
long right;
long bottom;
} IJL_RECT;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_HANDLE
//
// Purpose: file handle
//
// Context: used internally
//
// Fields:
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef void* IJL_HANDLE;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJLIOTYPE
//
// Purpose: Possible types of data read/write/other operations to be
// performed by the functions IJL_Read and IJL_Write.
//
// See the Developer's Guide for details on appropriate usage.
//
// Fields:
//
// IJL_JFILE_XXXXXXX Indicates JPEG data in a stdio file.
//
// IJL_JBUFF_XXXXXXX Indicates JPEG data in an addressable buffer.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef enum _IJLIOTYPE
{
IJL_SETUP = -1,
/* Read JPEG parameters (i.e., height, width, channels, sampling, etc.) */
/* from a JPEG bit stream. */
IJL_JFILE_READPARAMS = 0,
IJL_JBUFF_READPARAMS = 1,
/* Read a JPEG Interchange Format image. */
IJL_JFILE_READWHOLEIMAGE = 2,
IJL_JBUFF_READWHOLEIMAGE = 3,
/* Read JPEG tables from a JPEG Abbreviated Format bit stream. */
IJL_JFILE_READHEADER = 4,
IJL_JBUFF_READHEADER = 5,
/* Read image info from a JPEG Abbreviated Format bit stream. */
IJL_JFILE_READENTROPY = 6,
IJL_JBUFF_READENTROPY = 7,
/* Write an entire JFIF bit stream. */
IJL_JFILE_WRITEWHOLEIMAGE = 8,
IJL_JBUFF_WRITEWHOLEIMAGE = 9,
/* Write a JPEG Abbreviated Format bit stream. */
IJL_JFILE_WRITEHEADER = 10,
IJL_JBUFF_WRITEHEADER = 11,
/* Write image info to a JPEG Abbreviated Format bit stream. */
IJL_JFILE_WRITEENTROPY = 12,
IJL_JBUFF_WRITEENTROPY = 13,
/* Scaled Decoding Options: */
/* Reads a JPEG image scaled to 1/2 size. */
IJL_JFILE_READONEHALF = 14,
IJL_JBUFF_READONEHALF = 15,
/* Reads a JPEG image scaled to 1/4 size. */
IJL_JFILE_READONEQUARTER = 16,
IJL_JBUFF_READONEQUARTER = 17,
/* Reads a JPEG image scaled to 1/8 size. */
IJL_JFILE_READONEEIGHTH = 18,
IJL_JBUFF_READONEEIGHTH = 19,
/* Reads an embedded thumbnail from a JFIF bit stream. */
IJL_JFILE_READTHUMBNAIL = 20,
IJL_JBUFF_READTHUMBNAIL = 21
} IJLIOTYPE;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_COLOR
//
// Purpose: Possible color space formats.
//
// Note these formats do *not* necessarily denote
// the number of channels in the color space.
// There exists separate "channel" fields in the
// JPEG_CORE_PROPERTIES data structure specifically
// for indicating the number of channels in the
// JPEG and/or DIB color spaces.
//
// See the Developer's Guide for details on appropriate usage.
//
////////////////////////////////////////////////////////////////////////////
*D*/
typedef enum _IJL_COLOR
{
IJL_RGB = 1, /* Red-Green-Blue color space. */
IJL_BGR = 2, /* Reversed channel ordering from IJL_RGB. */
IJL_YCBCR = 3, /* Luminance-Chrominance color space as defined */
/* by CCIR Recommendation 601. */
IJL_G = 4, /* Grayscale color space. */
IJL_RGBA_FPX = 5, /* FlashPix RGB 4 channel color space that */
/* has pre-multiplied opacity. */
IJL_YCBCRA_FPX = 6, /* FlashPix YCbCr 4 channel color space that */
/* has pre-multiplied opacity. */
IJL_OTHER = 255 /* Some other color space not defined by the IJL. */
/* (This means no color space conversion will */
/* be done by the IJL.) */
} IJL_COLOR;
/*D*
////////////////////////////////////////////////////////////////////////////
// Name: IJL_JPGSUBSAMPLING
//
// Purpose: Possible subsampling formats used
- 1
- 2
- 3
- 4
前往页