diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-01 11:40:23 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2017-05-01 11:40:23 (GMT) |
| commit | eb0fdd6e33c6f88fea4277f181279ca8f8601b73 (patch) | |
| tree | 312f1713f03e674ce27193ba046f8f40346dc32b /generic/tkCanvPs.c | |
| parent | 1b7de38d29abcb21ba31491b0ffa17a287ac4c50 (diff) | |
| download | tk-rfe_22ace0d494.zip tk-rfe_22ace0d494.tar.gz tk-rfe_22ace0d494.tar.bz2 | |
Adapt detection for whethere there is alpha or not on Postscript generation to new algorithm. And adapt documentation accordingly.rfe_22ace0d494
Diffstat (limited to 'generic/tkCanvPs.c')
| -rw-r--r-- | generic/tkCanvPs.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index c6470dd..19ebf43 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -1572,12 +1572,12 @@ Tk_PostscriptPhoto( width, height, bpc, height, decode, displayOperation); /* - * Check the PhotoImageBlock information. We assume that: - * if pixelSize is 1,2 or 4, the image is R,G,B,A; - * if pixelSize is 3, the image is R,G,B and offset[3] is bogus. + * Check the PhotoImageBlock information. */ - if (blockPtr->pixelSize == 3) { + if ((blockPtr->offset[3] == blockPtr->offset[0]) + || (blockPtr->offset[3] == blockPtr->offset[1]) + || (blockPtr->offset[3] == blockPtr->offset[2]) || ) { /* * No alpha information: the whole image is opaque. */ |
