[gs-cvs] rev 8058 - trunk/gs/src

tim at ghostscript.com tim at ghostscript.com
Mon Jun 18 09:37:50 PDT 2007


Author: tim
Date: 2007-06-18 09:37:50 -0700 (Mon, 18 Jun 2007)
New Revision: 8058

Modified:
   trunk/gs/src/gsdparam.c
Log:
Need to use maximum of max_gray and max_color to know how many bits are
supported.

DETAILS:

For determining the device color depth, one must check both max_gray and
max_color and use the maximum of the two. For example, with rgb devices
max_gray will be equal to zero. Thanks to Ray for catching my oversite here.

EXPTECTED DIFFERENCES:

None. No alpha bit testing is done in the regression suite.



Modified: trunk/gs/src/gsdparam.c
===================================================================
--- trunk/gs/src/gsdparam.c	2007-06-18 15:20:47 UTC (rev 8057)
+++ trunk/gs/src/gsdparam.c	2007-06-18 16:37:50 UTC (rev 8058)
@@ -803,10 +803,12 @@
 	dev->ImagingBBox_set = false;
     }
     dev->UseCIEColor = ucc;
-    dev->color_info.anti_alias.text_bits =
-    	param_normalize_anti_alias_bits(dev->color_info.max_gray, tab);
-    dev->color_info.anti_alias.graphics_bits =
-    	param_normalize_anti_alias_bits(dev->color_info.max_gray, gab);
+	dev->color_info.anti_alias.text_bits =
+		param_normalize_anti_alias_bits(max(dev->color_info.max_gray,
+			dev->color_info.max_color), tab);
+	dev->color_info.anti_alias.graphics_bits =
+		param_normalize_anti_alias_bits(max(dev->color_info.max_gray,
+			dev->color_info.max_color), gab);
     dev->LockSafetyParams = locksafe;
     gx_device_decache_colors(dev);
     return 0;



More information about the gs-cvs mailing list