diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2023-02-07 18:19:20 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2023-02-08 15:36:40 +0000 |
commit | eecd33392f90b77853a0d2ba64d115eec34890a3 (patch) | |
tree | 64cf3732a9f975c7bb7a13a90145afb0eb3833d2 /devices | |
parent | 71d572e6b72d209b99f34b311298d51eac32fbb1 (diff) | |
download | ghostpdl-eecd33392f90b77853a0d2ba64d115eec34890a3.tar.gz |
Add "imagematrices_are_untrustworthy" to gs_data_image_t
The pdfwrite device can 'rewrite' the image matrixes in a
particularly nasty way that is not easy to avoid. It does this
to be able to capture images with masks of a different size.
Unfortunately, this breaks any possibility of us using the
imagematrix to figure out which source region of the image
we actually need for clipping.
Introduce a new flag to capture when this happens so we can
avoid relying on an untrustworthy imagematrix.
Diffstat (limited to 'devices')
-rw-r--r-- | devices/vector/gdevpdfi.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/devices/vector/gdevpdfi.c b/devices/vector/gdevpdfi.c index c66b98486..e4681de58 100644 --- a/devices/vector/gdevpdfi.c +++ b/devices/vector/gdevpdfi.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2001-2022 Artifex Software, Inc. +/* Copyright (C) 2001-2023 Artifex Software, Inc. All Rights Reserved. This software is provided AS-IS with no warranty, either express or @@ -383,6 +383,7 @@ static int setup_type3_image(gx_device_pdf *pdev, const gs_gstate * pgs, gs_matrix_scale(&pim3a.ImageMatrix, 1, 1.0 / sy, &pim3a.ImageMatrix); } gs_matrix_multiply(&mi, &pim3a.MaskDict.ImageMatrix, &pim3a.MaskDict.ImageMatrix); + pim3a.imagematrices_are_untrustworthy = 1; pic1 = (gs_image_common_t *)&pim3a; /* Setting pdev->converting_image_matrix to communicate with pdf_image3_make_mcde. */ gs_matrix_multiply(&mi, &ctm_only(pgs), &pdev->converting_image_matrix); |