diff options
author | Christoph M. Becker <cmbecker69@gmx.de> | 2018-11-25 17:58:41 +0100 |
---|---|---|
committer | Christoph M. Becker <cmbecker69@gmx.de> | 2018-11-25 17:58:41 +0100 |
commit | 6613094e5d218dc4d4372757aef5e58c6462a9f7 (patch) | |
tree | 8756fd609cd5502b4c5b8a2a5fbc7b1c32a84024 /src/gd_crop.c | |
parent | bda85aaeeb1d7467d92c892ba4c30eaa53d7a6d4 (diff) | |
download | libgd-6613094e5d218dc4d4372757aef5e58c6462a9f7.tar.gz |
Fix #486: gdImageCropAuto(…, GD_CROP_SIDES) crops left but not right
`gdGuessBackgroundColorFromCorners()` is supposed to handle *all* cases
where an image has exactly two equal colors in the same way.
Diffstat (limited to 'src/gd_crop.c')
-rw-r--r-- | src/gd_crop.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gd_crop.c b/src/gd_crop.c index 0c0ae9f..68f58c6 100644 --- a/src/gd_crop.c +++ b/src/gd_crop.c @@ -281,7 +281,7 @@ static int gdGuessBackgroundColorFromCorners(gdImagePtr im, int *color) } else if (tl == tr || tl == bl || tl == br) { *color = tl; return 2; - } else if (tr == bl) { + } else if (tr == bl || tr == br) { *color = tr; return 2; } else if (br == bl) { |