Bug 488955 - Fix linear gamma input tables, used in iCCP PNG testsuite images. r=joe
authorJeff Muizelaar <jmuizelaar@mozilla.com>
Wed, 22 Apr 2009 13:49:09 -0400
changeset 27632 c4264cf03c96880648dd7632f6e548ea18e999f6
parent 27631 6049dbd9973cc06a509a1694367f2281f35d4482
child 27633 b5ce248b389f21d24fdfaa6af536e94294f4f37a
push idunknown
push userunknown
push dateunknown
reviewersjoe
bugs488955
milestone1.9.2a1pre
Bug 488955 - Fix linear gamma input tables, used in iCCP PNG testsuite images. r=joe
gfx/qcms/transform.c
--- a/gfx/qcms/transform.c
+++ b/gfx/qcms/transform.c
@@ -74,17 +74,17 @@ void compute_curve_gamma_table_type2(flo
 		gamma_table[i] = lut_interp_linear(i/255., table, length);
 	}
 }
 
 void compute_curve_gamma_table_type0(float gamma_table[256])
 {
 	unsigned int i;
 	for (i = 0; i < 256; i++) {
-		gamma_table[i] = i;
+		gamma_table[i] = i/255.;
 	}
 }
 
 unsigned char clamp_u8(float v)
 {
 	if (v > 255.)
 		return 255;
 	else if (v < 0)