summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp@users.sourceforge.net <dgp>2015-05-05 19:30:16 (GMT)
committerdgp@users.sourceforge.net <dgp>2015-05-05 19:30:16 (GMT)
commite9d8a67bc15f8d973c67a5add0543be90f3a797a (patch)
tree5f29753b8f6b95d64666448d5cf16baef8997c9d /generic
parent04802951c9fb7425ecc5e09d5a19618aea9fb36f (diff)
downloadtk-e9d8a67bc15f8d973c67a5add0543be90f3a797a.zip
tk-e9d8a67bc15f8d973c67a5add0543be90f3a797a.tar.gz
tk-e9d8a67bc15f8d973c67a5add0543be90f3a797a.tar.bz2
[3603436][06c3fcb136] Correction to earlier bugfix. When alpha values are
all opaque, so that image format writers may use non-alpha supporting formats losslessly, make sure that message always gets back to the caller.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkImgPhoto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 58c4484..780b0c2 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -5648,6 +5648,9 @@ ImgGetPhoto(
break;
}
}
+ if (!alphaOffset) {
+ blockPtr->offset[3]= -1; /* Tell caller alpha need not be read */
+ }
greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
if (((optPtr->options & OPT_BACKGROUND) && alphaOffset) ||
@@ -5766,9 +5769,6 @@ ImgGetPhoto(
blockPtr->offset[2]= 0;
blockPtr->offset[3]= 1;
}
- if (!alphaOffset) {
- blockPtr->offset[3]= -1;
- }
return data;
}
return NULL;