2005.09.26 05:53 "[Tiff] TIFF Image from Ricoh Caplio GX", by Katrina Maramba
Hi everyone,
My code works fine with Olympus Cameras, Konica Minolta A2 and Sony F828. HOwever when I tried processing an image from Ricoh Caplio GX, it had a data abort and the backtrace revealed the data abort was in tif_color.c, line 184 which is the line:
*g = ycbcr->clamptab[ycbcr->Y_tab[Y]
+ (int)((ycbcr->Cb_g_tab[Cb] +
ycbcr->Cr_g_tab[Cr]) >> SHIFT)];
in this function:
void
TIFFYCbCrtoRGB(TIFFYCbCrToRGB *ycbcr, uint32 Y, int32
Cb, int32 Cr,
uint32 *r, uint32 *g, uint32 *b)
{
/* XXX: Only 8-bit YCbCr input supported for now */
Y = CLAMP(Y, 0, 255), Cb = CLAMP(Cb, 0, 255), Cr =
CLAMP(Cr, 0, 255);
*r = ycbcr->clamptab[ycbcr->Y_tab[Y] +
ycbcr->Cr_r_tab[Cr]];
*g = ycbcr->clamptab[ycbcr->Y_tab[Y]
+ (int)((ycbcr->Cb_g_tab[Cb] +
ycbcr->Cr_g_tab[Cr]) >> SHIFT)];
*b = ycbcr->clamptab[ycbcr->Y_tab[Y] +
ycbcr->Cb_b_tab[Cb]];
}
Please advise me on what I can do or what I did wrong to encounter this error.
Thank you very much!
Regards,
Katrina
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com