summaryrefslogtreecommitdiffstats
path: root/generic/tkImgPhoto.c
diff options
context:
space:
mode:
authorJoe Mistachkin <joe@mistachkin.com>2014-11-11 22:23:34 (GMT)
committerJoe Mistachkin <joe@mistachkin.com>2014-11-11 22:23:34 (GMT)
commitb15c525eedc93a453dfea94482bc1198e27748fc (patch)
tree49a88f59bc168351fe802d8aa68da6d853b823aa /generic/tkImgPhoto.c
parent07f85cd3c1b4934fb746ea36516ba2944b4eea11 (diff)
parentee9722cf78769c35f57383613f570b6e797e74bf (diff)
downloadtk-b15c525eedc93a453dfea94482bc1198e27748fc.zip
tk-b15c525eedc93a453dfea94482bc1198e27748fc.tar.gz
tk-b15c525eedc93a453dfea94482bc1198e27748fc.tar.bz2
Merge updates from core 8.5 branch.
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r--generic/tkImgPhoto.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c
index 85c7de5..58c4484 100644
--- a/generic/tkImgPhoto.c
+++ b/generic/tkImgPhoto.c
@@ -5648,12 +5648,6 @@ ImgGetPhoto(
break;
}
}
- if (!alphaOffset) {
- blockPtr->pixelPtr--;
- blockPtr->offset[0]++;
- blockPtr->offset[1]++;
- blockPtr->offset[2]++;
- }
greenOffset = blockPtr->offset[1] - blockPtr->offset[0];
blueOffset = blockPtr->offset[2] - blockPtr->offset[0];
if (((optPtr->options & OPT_BACKGROUND) && alphaOffset) ||
@@ -5766,9 +5760,14 @@ ImgGetPhoto(
if (newPixelSize>2) {
blockPtr->offset[1]= 1;
blockPtr->offset[2]= 2;
+ blockPtr->offset[3]= 3;
} else {
blockPtr->offset[1]= 0;
blockPtr->offset[2]= 0;
+ blockPtr->offset[3]= 1;
+ }
+ if (!alphaOffset) {
+ blockPtr->offset[3]= -1;
}
return data;
}