diff options
author | dgp@users.sourceforge.net <dgp> | 2015-05-05 19:30:16 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2015-05-05 19:30:16 (GMT) |
commit | ca0f1de3a38508d23f2a338134fec092055d548e (patch) | |
tree | c944bee5a92ae4fcc974a2a2f00cf228a91bab3e | |
parent | 29c9356832f61dba597dcb8248aa5aaad0fa9407 (diff) | |
download | tk-ca0f1de3a38508d23f2a338134fec092055d548e.zip tk-ca0f1de3a38508d23f2a338134fec092055d548e.tar.gz tk-ca0f1de3a38508d23f2a338134fec092055d548e.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.
-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; |