Enlightenment CVS committal Author : raster Project : e17 Module : libs/imlib2
Dir : e17/libs/imlib2/src/modules/loaders Modified Files: loader_tiff.c Log Message: tiff loader fix =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/imlib2/src/modules/loaders/loader_tiff.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- loader_tiff.c 14 Dec 2004 03:50:46 -0000 1.2 +++ loader_tiff.c 1 Dec 2005 07:46:07 -0000 1.3 @@ -97,11 +97,20 @@ for (j = 0; j < w; j++) { + int a, r, g, b; + + a = TIFFGetA(pixel_value); + r = TIFFGetR(pixel_value); + g = TIFFGetG(pixel_value); + b = TIFFGetB(pixel_value); pixel_value = (*(pixel++)); - (*(buffer_pixel++)) = - (TIFFGetA(pixel_value) << 24) | - (TIFFGetR(pixel_value) << 16) | (TIFFGetG(pixel_value) << 8) | - TIFFGetB(pixel_value); + if ((a > 0) && (a < 255)) + { + r = (r * 255) / a; + g = (g * 255) / a; + b = (b * 255) / a; + } + (*(buffer_pixel++)) = (a << 14) | (r << 16) | (g << 8) | b; } } ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs