/*
* Color Management
*
- * $Id: jas_cm.c,v 1.1 2005/05/22 18:32:58 malaterre Exp $
+ * $Id: jas_cm.c,v 1.3 2005/07/01 13:18:59 malaterre Exp $
*/
#include <jasper/jas_config.h>
goto error;
if (!(prof = jas_cmprof_createfromiccprof(iccprof)))
goto error;
-#if 0
+#if 1
jas_iccprof_destroy(iccprof);
#else
prof->iccprof = iccprof;
bufptr = &outbuf[i];
dataptr = &fmt->buf[n];
for (j = 0; j < m; ++j) {
- v = (*bufptr) * scale + bias;
+ v = (long)((*bufptr) * scale + bias); /* warning C4244: '=' : conversion from 'jas_cmreal_t' to 'long', possible loss of data */
bufptr += xform->numoutchans;
if (jas_cmputint(&dataptr, fmt->sgnd, fmt->prec, v))
goto error;
int lo;
int hi;
t = x * (lut->size - 1);
- lo = floor(t);
+ lo = (int)floor(t); /* warning C4244: '=' : conversion from 'double' to 'int', possible loss of data */
if (lo < 0)
return lut->data[0];
- hi = ceil(t);
+ hi = (int)ceil(t); /* warning C4244: '=' : conversion from 'double' to 'int', possible loss of data */
if (hi >= lut->size)
return lut->data[lut->size - 1];
return lut->data[lo] + (t - lo) * (lut->data[hi] - lut->data[lo]);