75 #include <jasper/jas_config.h> 104 JAS_CMXFORM_OP_FWD = 0,
105 JAS_CMXFORM_OP_REV = 1,
106 JAS_CMXFORM_OP_PROOF = 2,
107 JAS_CMXFORM_OP_GAMUT = 3,
115 JAS_CMXFORM_INTENT_PER = 0,
116 JAS_CMXFORM_INTENT_RELCLR = 1,
117 JAS_CMXFORM_INTENT_ABSCLR = 2,
118 JAS_CMXFORM_INTENT_SAT = 3,
125 #define JAS_CMXFORM_NUMINTENTS 4 132 JAS_CMXFORM_OPTM_SPEED = 0,
133 JAS_CMXFORM_OPTM_SIZE = 1,
134 JAS_CMXFORM_OPTM_ACC = 2,
141 #define jas_clrspc_create(fam, mbr) (((fam) << 8) | (mbr)) 148 #define jas_clrspc_fam(clrspc) ((clrspc) >> 8) 154 #define jas_clrspc_mbr(clrspc) ((clrspc) & 0xff) 160 #define jas_clrspc_isgeneric(clrspc) (!jas_clrspc_mbr(clrspc)) 166 #define jas_clrspc_isunknown(clrspc) ((clrspc) & JAS_CLRSPC_UNKNOWNMASK) 168 #define JAS_CLRSPC_UNKNOWNMASK 0x4000 173 #define JAS_CLRSPC_FAM_UNKNOWN 0 174 #define JAS_CLRSPC_FAM_XYZ 1 175 #define JAS_CLRSPC_FAM_LAB 2 176 #define JAS_CLRSPC_FAM_GRAY 3 177 #define JAS_CLRSPC_FAM_RGB 4 178 #define JAS_CLRSPC_FAM_YCBCR 5 183 #define JAS_CLRSPC_UNKNOWN JAS_CLRSPC_UNKNOWNMASK 184 #define JAS_CLRSPC_CIEXYZ jas_clrspc_create(JAS_CLRSPC_FAM_XYZ, 1) 185 #define JAS_CLRSPC_CIELAB jas_clrspc_create(JAS_CLRSPC_FAM_LAB, 1) 186 #define JAS_CLRSPC_SGRAY jas_clrspc_create(JAS_CLRSPC_FAM_GRAY, 1) 187 #define JAS_CLRSPC_SRGB jas_clrspc_create(JAS_CLRSPC_FAM_RGB, 1) 188 #define JAS_CLRSPC_SYCBCR jas_clrspc_create(JAS_CLRSPC_FAM_YCBCR, 1) 193 #define JAS_CLRSPC_GENRGB jas_clrspc_create(JAS_CLRSPC_FAM_RGB, 0) 194 #define JAS_CLRSPC_GENGRAY jas_clrspc_create(JAS_CLRSPC_FAM_GRAY, 0) 195 #define JAS_CLRSPC_GENYCBCR jas_clrspc_create(JAS_CLRSPC_FAM_YCBCR, 0) 197 #define JAS_CLRSPC_CHANIND_YCBCR_Y 0 198 #define JAS_CLRSPC_CHANIND_YCBCR_CB 1 199 #define JAS_CLRSPC_CHANIND_YCBCR_CR 2 201 #define JAS_CLRSPC_CHANIND_RGB_R 0 202 #define JAS_CLRSPC_CHANIND_RGB_G 1 203 #define JAS_CLRSPC_CHANIND_RGB_B 2 205 #define JAS_CLRSPC_CHANIND_GRAY_Y 0 292 unsigned numoutchans;
317 unsigned numoutchans;
321 #define JAS_CMPROF_TYPE_DEV 1 322 #define JAS_CMPROF_TYPE_CLRSPC 2 324 #define JAS_CMPROF_NUMPXFORMSEQS 13 333 unsigned numrefchans;
334 jas_iccprof_t *iccprof;
343 typedef int_fast32_t jas_cmattrname_t;
344 typedef int_fast32_t jas_cmattrval_t;
345 typedef int_fast32_t jas_cmattrtype_t;
351 int jas_cm_prof_setattr(jas_cm_prof_t *prof, jas_cm_attrname_t name,
void *val);
353 void *jas_cm_prof_getattr(jas_cm_prof_t *prof, jas_cm_attrname_t name);
489 #define jas_cmprof_clrspc(prof) ((prof)->clrspc)
jas_cmxform_op_t
Transform operations.
Definition: jas_cm.h:103
struct jas_cmpxform_s jas_cmpxform_t
Transform class.
Shaper matrix look-up table (LUT).
Definition: jas_cm.h:249
unsigned jas_clrspc_numchans(jas_clrspc_t clrspc)
Get the number of channels associated with a particular color space.
Definition: jas_cm.c:1410
jas_cmxform_intent_t
Rendering intents.
Definition: jas_cm.h:114
Shaper look-up table (LUT).
Definition: jas_cm.h:271
jas_cmxform_optm_t
Transform optimization.
Definition: jas_cm.h:131
JAS_EXPORT jas_cmprof_t * jas_cmprof_createfromclrspc(jas_clrspc_t clrspc)
Create a color-management profile from a color space.
Definition: jas_cm.c:169
JAS_EXPORT jas_cmxform_t * jas_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.
Definition: jas_cm.c:437
double jas_cmreal_t
Definition: jas_cm.h:210
unsigned jas_clrspc_t
Color space.
Definition: jas_cm.h:97
I/O stream object.
Definition: jas_stream.h:206
JAS_EXPORT jas_cmprof_t * jas_cmprof_copy(const jas_cmprof_t *prof)
Copy a color-management profile.
Definition: jas_cm.c:407
JAS_EXPORT void jas_cmprof_destroy(jas_cmprof_t *prof)
Destroy a color-management profile.
Definition: jas_cm.c:393
Pixmap (i.e., multicomponent) format.
Definition: jas_cm.h:230
JAS_EXPORT jas_iccprof_t * jas_iccprof_createfromcmprof(const jas_cmprof_t *prof)
Create a ICC profile from a CM profile.
Definition: jas_cm.c:1425
Shaper matrix.
Definition: jas_cm.h:258
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.
Definition: jas_cm.c:552
Component format.
Definition: jas_cm.h:218
JAS_EXPORT void jas_cmxform_destroy(jas_cmxform_t *xform)
Destroy a transform.
Definition: jas_cm.c:661
JAS_EXPORT jas_cmprof_t * jas_cmprof_createfromiccprof(const jas_iccprof_t *iccprof)
Create a color-management profile from an ICC profile.
Definition: jas_cm.c:291
Color space conversion.
Definition: jas_cm.h:279