📄 csj2kl.h
字号:
//
//
// CHARMSOFT 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 Charmsoft Corporation. All Rights Reserved.
//
//
// File:
// CSJ2KL.H
//
// Purpose:
// CSJ2KL Common Header File
// This file contains: definitions for data types, data
// structures, error codes, and function prototypes used
// in the Charmsoft(R) JPEG2000 Library (CSJ2KL).
//
// Version:
// 2.20
//
#ifdef CSJ2KL_EXPORTS
#define CSJ2KL_API __declspec(dllexport)
#else
#define CSJ2KL_API __declspec(dllimport)
#endif
#define CSJ2KL_DIB_PAD_BYTES(width) ((width*24+31)/32*4)
typedef enum _CSJ2KLIOTYPE
{
CSJ2KL_JFILE_READPARAMS = 0,
CSJ2KL_JBUFF_READPARAMS = 1,
/* Read a JPEG Interchange Format image. */
CSJ2KL_JFILE_READWHOLEIMAGE = 2,
CSJ2KL_JBUFF_READWHOLEIMAGE = 3,
/* Write an entire JFIF bit stream. */
CSJ2KL_JFILE_WRITEWHOLEIMAGE = 4,
CSJ2KL_JBUFF_WRITEWHOLEIMAGE = 5,
} CSJ2KLIOTYPE;
typedef enum _CSJ2KL_COLOR
{
CSJ2KL_RGB = 1, /* Red-Green-Blue color space. */
CSJ2KL_BGR = 2, /* Reversed channel ordering from CSJ2KL_RGB. */
CSJ2KL_OTHER = 255 /* Some other color space not defined by the CSJ2KL. */
/* (This means no color space conversion will */
/* be done by the CSJ2KL.) */
} CSJ2KL_COLOR;
typedef enum _CSJ2KL_ERROR
{
CSJ2KL_OK = 0, /* OK */
CSJ2KL_ERROR_ENCODE = -1,
CSJEKL_UNKNOWN = -255
} CSJ2KL_ERROR;
typedef struct _JPEG2K_CORE_PROPERTIES
{
/* DIB specific I/O data specifiers. */
unsigned char* DIBBytes; /* default = NULL */
int DIBWidth; /* default = 0 */
int DIBHeight; /* default = 0 */
int DIBPadBytes; /* default = 0 */
int DIBChannels; /* default = 3 */
int DIBBitsPerChannel; /* default = 8 */
int DIBInversion; /* default = 0 */
CSJ2KL_COLOR DIBColor; /* default = CSJ2KL_BGR */
/* JPEG2000 specific I/O data specifiers. */
const char* JPGFile; /* default = NULL */
unsigned char* JPGBytes; /* default = NULL */
int JPGSizeBytes; /* default = 0 */
int JPGBitsPerChannel; /* default = 8 */
int JPGWidth; /* default = 0 */
int JPGHeight; /* default = 0 */
int JPGChannels; /* default = 3 */
int JPGQuality; /* default = 75 */
} JPEG2K_CORE_PROPERTIES;
CSJ2KL_API CSJ2KL_ERROR CSJ2KL_INIT(JPEG2K_CORE_PROPERTIES *JCP);
CSJ2KL_API CSJ2KL_ERROR CSJ2KL_READ(JPEG2K_CORE_PROPERTIES *JCP,CSJ2KLIOTYPE TYPE);
CSJ2KL_API CSJ2KL_ERROR CSJ2KL_WRITE(JPEG2K_CORE_PROPERTIES *JCP,CSJ2KLIOTYPE TYPE);
CSJ2KL_API CSJ2KL_ERROR CSJ2KL_FREE(JPEG2K_CORE_PROPERTIES *JCP);
CSJ2KL_API char* CSJ2KL_GETVERSION ();
CSJ2KL_API char* CSJ2KL_ERRORSTRING(CSJ2KL_ERROR code);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -