diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tkImgPhoto.c | 6 |
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; |