diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2010-06-25 10:02:19 +0000 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2010-06-25 10:02:19 +0000 |
commit | 22fd59310dd5f9d65ff8f52b6ce700fef68ced9a (patch) | |
tree | 763a7c0c37b303c513ae49e21acdc99d7aec4da1 /xps | |
parent | 938d0ecced8356cc5e4b38c5856ef23ff48380ab (diff) |
Fix bug where image->colorspace was still treated as an enum.
The TIFF decoder incremented image->colorspace to move
from RGB to RGBA to flag for the existence of alpha values.
Set the hasalpha flag exlicitly instead.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@11429 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'xps')
-rw-r--r-- | xps/xpstiff.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xps/xpstiff.c b/xps/xpstiff.c index 31aee52a5..302341dd9 100644 --- a/xps/xpstiff.c +++ b/xps/xpstiff.c @@ -766,13 +766,13 @@ xps_decode_tiff_strips(xps_context_t *ctx, xps_tiff_t *tiff, xps_image_t *image) /* Premultiplied transparency */ if (tiff->extrasamples == 1) { - image->colorspace ++; + image->hasalpha = 1; } /* Non-pre-multiplied transparency */ if (tiff->extrasamples == 2) { - image->colorspace ++; + image->hasalpha = 1; } return gs_okay; @@ -1031,9 +1031,6 @@ xps_decode_tiff(xps_context_t *ctx, byte *buf, int len, xps_image_t *image) if (error) return gs_rethrow(error, "cannot decode tiff header"); - if (tiff->extrasamples == 2 || tiff->extrasamples == 1) - image->hasalpha = 1; - /* * Decode the image strips */ |