ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

static int TIFFDefaultRefBlackWhite ( TIFFDirectory td) [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;
}

Generated on Sun May 27 2012 04:49:33 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.