diff options
author | dgp <dgp@users.sourceforge.net> | 2015-05-05 19:30:16 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2015-05-05 19:30:16 (GMT) |
commit | d1dd76e66ac3f2e94f74fa863b4f90c76e278db4 (patch) | |
tree | 5f29753b8f6b95d64666448d5cf16baef8997c9d /generic/tkImgPhoto.c | |
parent | cfb7729cff94d8f2b0188de7a0f1fb6c5d4d2193 (diff) | |
download | tk-d1dd76e66ac3f2e94f74fa863b4f90c76e278db4.zip tk-d1dd76e66ac3f2e94f74fa863b4f90c76e278db4.tar.gz tk-d1dd76e66ac3f2e94f74fa863b4f90c76e278db4.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/tkImgPhoto.c')
-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; |