From 7662af082b44f8164d1adadc5688f30d888e6a63 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Fri, 22 Aug 2014 15:35:13 +0200 Subject: Revise test-device; thresholding and exhaustive checking. The original version of the test-device could characterise pages as being grayscale/color purely based on the colorspaces used. This could easily be upset by grayscale images or shadings that happened to be specified in non-grayscale colorspaces however. We now look at the actual shading and image color values, and use a threshold value to allow for some measure of rounding errors in color values that are in practice grayscale. --- source/tools/mudraw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/tools/mudraw.c') diff --git a/source/tools/mudraw.c b/source/tools/mudraw.c index 79092d9c..198e47ce 100644 --- a/source/tools/mudraw.c +++ b/source/tools/mudraw.c @@ -316,7 +316,7 @@ static void drawpage(fz_context *ctx, fz_document *doc, int pagenum) if (showfeatures) { int iscolor; - dev = fz_new_test_device(ctx, &iscolor); + dev = fz_new_test_device(ctx, &iscolor, 0.02f); if (list) fz_run_display_list(list, dev, &fz_identity, &fz_infinite_rect, NULL); else -- cgit v1.2.3