JasPer  3.0.6
jas_cm.h File Reference

JasPer Color Management. More...

#include <jasper/jas_config.h>
#include <jasper/jas_types.h>
#include <jasper/jas_icc.h>

Go to the source code of this file.

Classes

struct  jas_cmcmptfmt_t
 Component format. More...
 
struct  jas_cmpixmap_t
 Pixmap (i.e., multicomponent) format. More...
 
struct  jas_cmpxformops_t
 Transform operations. More...
 
struct  jas_cmshapmatlut_t
 Shaper matrix look-up table (LUT). More...
 
struct  jas_cmshapmat_t
 Shaper matrix. More...
 
struct  jas_cmshaplut_t
 Shaper look-up table (LUT). More...
 
struct  jas_cmclrspcconv_t
 Color space conversion. More...
 
struct  jas_cmpxform_s
 Transform class. More...
 
struct  jas_cmpxformseq_t
 Primitive transform sequence class. More...
 
struct  jas_cmxform_t
 Primitive transform class. More...
 
struct  jas_cmprof_t
 

Macros

#define JAS_CMXFORM_NUMINTENTS   4
 Number of rendering intents. More...
 
#define jas_clrspc_create(fam, mbr)   (((fam) << 8) | (mbr))
 Create a color space. More...
 
#define jas_clrspc_fam(clrspc)   ((clrspc) >> 8)
 Get the family of a color space. More...
 
#define jas_clrspc_mbr(clrspc)   ((clrspc) & 0xff)
 Get the (family) member of a color space. More...
 
#define jas_clrspc_isgeneric(clrspc)   (!jas_clrspc_mbr(clrspc))
 Test if a color space is generic. More...
 
#define jas_clrspc_isunknown(clrspc)   ((clrspc) & JAS_CLRSPC_UNKNOWNMASK)
 Test if a color space is unknown. More...
 
#define JAS_CLRSPC_FAM_UNKNOWN   0
 Color space families. More...
 
#define JAS_CLRSPC_UNKNOWN   JAS_CLRSPC_UNKNOWNMASK
 Specific color spaces. More...
 
#define JAS_CLRSPC_GENRGB   jas_clrspc_create(JAS_CLRSPC_FAM_RGB, 0)
 Generic color spaces. More...
 
#define jas_cmprof_clrspc(prof)   ((prof)->clrspc)
 Get the color space associated with a color-management profile. More...
 

Typedefs

typedef unsigned jas_clrspc_t
 Color space. More...
 
typedef double jas_cmreal_t
 
typedef struct jas_cmpxform_s jas_cmpxform_t
 Transform class. More...
 

Enumerations

enum  jas_cmxform_op_t
 Transform operations. More...
 
enum  jas_cmxform_intent_t
 Rendering intents. More...
 
enum  jas_cmxform_optm_t
 Transform optimization. More...
 

Functions

JAS_EXPORT jas_cmprof_tjas_cmprof_createfromiccprof (const jas_iccprof_t *iccprof)
 Create a color-management profile from an ICC profile. More...
 
JAS_EXPORT jas_cmprof_tjas_cmprof_createfromclrspc (jas_clrspc_t clrspc)
 Create a color-management profile from a color space. More...
 
JAS_EXPORT void jas_cmprof_destroy (jas_cmprof_t *prof)
 Destroy a color-management profile. More...
 
JAS_EXPORT jas_cmprof_tjas_cmprof_copy (const jas_cmprof_t *prof)
 Copy a color-management profile. More...
 
JAS_EXPORT jas_iccprof_t * jas_iccprof_createfromcmprof (const jas_cmprof_t *prof)
 Create a ICC profile from a CM profile. More...
 
JAS_EXPORT jas_cmxform_tjas_cmxform_create (const jas_cmprof_t *inprof, const jas_cmprof_t *outprof, const jas_cmprof_t *proofprof, jas_cmxform_op_t op, jas_cmxform_intent_t intent, jas_cmxform_optm_t optimize)
 Create a transform from a CM profile. More...
 
JAS_EXPORT void jas_cmxform_destroy (jas_cmxform_t *xform)
 Destroy a transform. More...
 
JAS_EXPORT int jas_cmxform_apply (const jas_cmxform_t *xform, const jas_cmpixmap_t *in, jas_cmpixmap_t *out)
 Apply a transform to data. More...
 
unsigned jas_clrspc_numchans (jas_clrspc_t clrspc)
 Get the number of channels associated with a particular color space. More...
 

Detailed Description

JasPer Color Management.

jas_conf_set_allocator
JAS_EXPORT void jas_conf_set_allocator(jas_allocator_t *allocator)
Set the memory allocator to be used by the library.
Definition: jas_init.c:425
jas_stringtokenize
JAS_EXPORT int jas_stringtokenize(const char *string, const char *delim, char ***tokens_buf, size_t *max_tokens_buf, size_t *num_tokens_buf)
Split a string into tokens based on specified delimiters.
Definition: jas_string.c:135
JAS_OPT_HASARG
#define JAS_OPT_HASARG
Definition: jas_getopt.h:94
jas_optind
int jas_optind
The current option index.
Definition: jas_getopt.c:87
jas_std_allocator_init
JAS_EXPORT void jas_std_allocator_init(jas_std_allocator_t *allocator)
Initialize a memory allocator that uses malloc and related functions for managing memory.
Definition: jas_malloc.c:262
jas_tmr_get
double jas_tmr_get(jas_tmr_t *tmr)
Get the elapsed time for a timer.
Definition: jas_tmr.c:143
jasper.h
JasPer Main Header.
jas_conf_set_max_mem_usage
JAS_EXPORT void jas_conf_set_max_mem_usage(size_t max_mem)
Set the maximum amount of memory that can be used by the library (assuming the allocator wrapper is n...
Definition: jas_init.c:445
jas_conf_clear
JAS_EXPORT void jas_conf_clear()
Configure the JasPer library with the default configuration settings.
Definition: jas_init.c:397
jas_std_allocator_t
The standard library allocator (i.e., a wrapper for malloc and friends).
Definition: jas_malloc.h:143
jas_cleanup_library
JAS_EXPORT int jas_cleanup_library()
Perform clean up for the JasPer library.
Definition: jas_init.c:636
jas_cleanup_thread
JAS_EXPORT int jas_cleanup_thread()
Perform per-thread cleanup for the JasPer library.
Definition: jas_init.c:757
jas_get_total_mem_size
size_t jas_get_total_mem_size()
Get the total amount of memory available on the system.
Definition: jas_malloc.c:627
jas_opt_t
Command line option type.
Definition: jas_getopt.h:104
jas_realloc
JAS_EXPORT void * jas_realloc(void *ptr, size_t size)
Resize a block of allocated memory.
Definition: jas_malloc.c:151
jas_conf_set_debug_level
JAS_EXPORT void jas_conf_set_debug_level(int debug_level)
Set the initial debug level for the library.
Definition: jas_init.c:439
jas_tmr_t
Timer type.
jas_malloc
JAS_EXPORT void * jas_malloc(size_t size)
Allocate memory.
Definition: jas_malloc.c:136
jas_tmr_start
void jas_tmr_start(jas_tmr_t *tmr)
Start a timer.
Definition: jas_tmr.c:135
jas_init_thread
JAS_EXPORT int jas_init_thread()
Perform per-thread initialization for the JasPer library.
Definition: jas_init.c:696
jas_getopt
int jas_getopt(int argc, char **argv, const jas_opt_t *opts)
Get the next option.
Definition: jas_getopt.c:107
jas_free
JAS_EXPORT void jas_free(void *ptr)
Free memory.
Definition: jas_malloc.c:186
JAS_UNUSED
#define JAS_UNUSED(x)
Indicate that a variable may be unused (in order to avoid a compiler warning).
Definition: jas_compiler.h:145
jas_init_library
JAS_EXPORT int jas_init_library()
Initialize the JasPer library with the current configuration settings.
Definition: jas_init.c:475
jas_optarg
const char * jas_optarg
The current option argument.
Definition: jas_getopt.c:89
jas_tmr_stop
void jas_tmr_stop(jas_tmr_t *tmr)
Stop a timer.
Definition: jas_tmr.c:139