On 15 June 2010 12:59, <[email protected]> wrote:
> If you execute TestSlicer, you will see the callback MySlicer is
> being called for each node. The RGB space is "sliced" into cubes,
> and your callback is called on each cube.
Ahh, I see. I was doing this manually by cutting up a huge 3d array
and populating some seed data, and then just doing cmsDoTransform in
one pass.
I also think I've found a bug in lcms2 somewhere. This does not work:
static cmsInt32Number
lcms_sampler_cb (const cmsFloat32Number data_in[], cmsFloat32Number
data_out[], void *user_data)
{
cmsFloat64Number out[3];
cmsHTRANSFORM transform = (cmsHTRANSFORM) user_data;
cmsDoTransform (transform, data_in, &out, 1);
...
}
but this does:
static cmsInt32Number
lcms_sampler_cb (const cmsFloat32Number data_in[], cmsFloat32Number
data_out[], void *user_data)
{
int i;
cmsFloat64Number in[3];
cmsFloat64Number out[3];
cmsHTRANSFORM transform = (cmsHTRANSFORM) user_data;
in[0] = data_in[0];
in[1] = data_in[1];
in[2] = data_in[2];
cmsDoTransform (transform, in, &out, 1);
...
}
i.e. copying the non-register const data fixes things.
Richard.
------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
Lcms-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/lcms-user