summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 9527c93..63e2fa8 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -3683,6 +3683,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) ||
@@ -3803,9 +3806,6 @@ ImgGetPhoto(
blockPtr->offset[2] = 0;
blockPtr->offset[3]= 1;
}
- if (!alphaOffset) {
- blockPtr->offset[3]= -1;
- }
return data;
}
return NULL;