divisible by tjmcuh[subsamp] (the MCU block height corresponding to the
level of chrominance subsampling used in the source image)
r.w = the width of the cropping region. Setting this to 0 is the
- equivalent of setting it to the width of the source JPEG image.
+ equivalent of setting it to the width of the source JPEG image - r.x.
r.h = the height of the cropping region. Setting this to 0 is the
- equivalent of setting it to the height of the source JPEG image.
+ equivalent of setting it to the height of the source JPEG image - r.y.
op = one of the transform operations described in the
"Transform operations" section above
options = the bitwise OR of one or more of the transform options described
if((xinfo=(jpeg_transform_info *)malloc(sizeof(jpeg_transform_info)*n))
==NULL)
_throw("Memory allocation failed in tjTransform()");
+ memset(xinfo, 0, sizeof(jpeg_transform_info)*n);
for(i=0; i<n; i++)
{
{
xinfo[i].crop_width=t[i].r.w; xinfo[i].crop_width_set=JCROP_POS;
}
+ else xinfo[i].crop_width=JCROP_UNSET;
if(t[i].r.h!=0)
{
xinfo[i].crop_height=t[i].r.h; xinfo[i].crop_height_set=JCROP_POS;
}
+ else xinfo[i].crop_height=JCROP_UNSET;
}
}