summaryrefslogtreecommitdiff
path: root/gs/base/gdevdflt.c
diff options
context:
space:
mode:
Diffstat (limited to 'gs/base/gdevdflt.c')
-rw-r--r--gs/base/gdevdflt.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gs/base/gdevdflt.c b/gs/base/gdevdflt.c
index 6ac0410ba..057264b14 100644
--- a/gs/base/gdevdflt.c
+++ b/gs/base/gdevdflt.c
@@ -934,6 +934,26 @@ gx_default_dev_spec_op(gx_device *pdev, int dev_spec_op, void *data, int size)
return (pdev->procs.fill_path == gx_default_fill_path);
case gxdso_is_std_cmyk_1bit:
return (pdev->procs.map_cmyk_color == cmyk_1bit_map_cmyk_color);
+ case gxdso_interpolate_antidropout:
+ if ((pdev->color_info.num_components == 1 &&
+ pdev->color_info.max_gray < 15) ||
+ (pdev->color_info.num_components > 1 &&
+ pdev->color_info.max_color < 15)) {
+ /* If we are are limited color device (i.e. we are halftoning)
+ * then use the antidropout interpolators. */
+ return 1;
+ }
+ return 0;
+ case gxdso_interpolate_threshold:
+ if ((pdev->color_info.num_components == 1 &&
+ pdev->color_info.max_gray < 15) ||
+ (pdev->color_info.num_components > 1 &&
+ pdev->color_info.max_color < 15)) {
+ /* If we are a limited color device (i.e. we are halftoning)
+ * then only interpolate if we are upscaling by at least 4 */
+ return 4;
+ }
+ return 0; /* Otherwise no change */
}
return gs_error_undefined;
}