components/openexr/patches/001-makePreview.patch
changeset 7964 d9801318ed3d
parent 7963 18067c41cdb2
equal deleted inserted replaced
7963:18067c41cdb2 7964:d9801318ed3d
     1 *** exrmakepreview/makePreview.cpp	2009-08-31 10:52:16.587024739 -0700
       
     2 --- exrmakepreview/makePreview.cpp	2009-08-31 10:52:18.578018655 -0700
       
     3 ***************
       
     4 *** 78,84 ****
       
     5       // at 0.0, 0.0, and 5.0 respectively.
       
     6       //
       
     7   
       
     8 !     float x = max (0.f, h * m);
       
     9   
       
    10       if (x > 1)
       
    11   	x = 1 + knee (x - 1, 0.184874f);
       
    12 --- 78,84 ----
       
    13       // at 0.0, 0.0, and 5.0 respectively.
       
    14       //
       
    15   
       
    16 !     float x = max (0.f, (float)(h * m));
       
    17   
       
    18       if (x > 1)
       
    19   	x = 1 + knee (x - 1, 0.184874f);
       
    20 ***************
       
    21 *** 132,138 ****
       
    22   	    preview.r = gamma (pixel.r, m);
       
    23   	    preview.g = gamma (pixel.g, m);
       
    24   	    preview.b = gamma (pixel.b, m);
       
    25 ! 	    preview.a = int (clamp (pixel.a * 255.f, 0.f, 255.f) + .5f);
       
    26   	}
       
    27       }
       
    28   }
       
    29 --- 132,138 ----
       
    30   	    preview.r = gamma (pixel.r, m);
       
    31   	    preview.g = gamma (pixel.g, m);
       
    32   	    preview.b = gamma (pixel.b, m);
       
    33 ! 	    preview.a = int (clamp ((double)(pixel.a * 255.f), (double)0.f, (double)255.f) + .5f);
       
    34   	}
       
    35       }
       
    36   }