diff --git a/src/libImaging/GetBBox.c b/src/libImaging/GetBBox.c index 2e8afc8d5..50b2253a0 100644 --- a/src/libImaging/GetBBox.c +++ b/src/libImaging/GetBBox.c @@ -53,6 +53,8 @@ ImagingGetBBox(Imaging im, int bbox[4], int alpha_only) { for (x = 0; x < im->xsize; x++) \ if (im->image[y][x] & mask) { \ has_data = 1; \ + if (x < bbox[0]) \ + bbox[0] = x; \ bbox[3] = y + 1; \ break; \ } \