Home | Info | Community | Development | myReactOS | Contact Us
[static]
Definition at line 106 of file tif_aux.c.
Referenced by TIFFVGetFieldDefaulted().
{ int i; if (!(td->td_refblackwhite = (float *)_TIFFmalloc(6*sizeof (float)))) return 0; if (td->td_photometric == PHOTOMETRIC_YCBCR) { /* * YCbCr (Class Y) images must have the ReferenceBlackWhite * tag set. Fix the broken images, which lacks that tag. */ td->td_refblackwhite[0] = 0.0F; td->td_refblackwhite[1] = td->td_refblackwhite[3] = td->td_refblackwhite[5] = 255.0F; td->td_refblackwhite[2] = td->td_refblackwhite[4] = 128.0F; } else { /* * Assume RGB (Class R) */ for (i = 0; i < 3; i++) { td->td_refblackwhite[2*i+0] = 0; td->td_refblackwhite[2*i+1] = (float)((1L<<td->td_bitspersample)-1L); } } return 1; }