diff --git a/Tests/test_box_blur.py b/Tests/test_box_blur.py index 8c52054a2..6224c435d 100644 --- a/Tests/test_box_blur.py +++ b/Tests/test_box_blur.py @@ -64,10 +64,12 @@ class TestBoxBlur(PillowTestCase): self.assertRaises(ValueError, self.box_blur, sample.convert("P")) self.box_blur(sample.convert("L")) self.box_blur(sample.convert("LA")) + self.box_blur(sample.convert("LA").convert("La")) self.assertRaises(ValueError, self.box_blur, sample.convert("I")) self.assertRaises(ValueError, self.box_blur, sample.convert("F")) self.box_blur(sample.convert("RGB")) self.box_blur(sample.convert("RGBA")) + self.box_blur(sample.convert("RGBA").convert("RGBa")) self.box_blur(sample.convert("CMYK")) self.assertRaises(ValueError, self.box_blur, sample.convert("YCbCr")) diff --git a/libImaging/BoxBlur.c b/libImaging/BoxBlur.c index 0fe3b7c35..854a53386 100644 --- a/libImaging/BoxBlur.c +++ b/libImaging/BoxBlur.c @@ -257,10 +257,12 @@ ImagingBoxBlur(Imaging imOut, Imaging imIn, float radius, int n) if (!(strcmp(imIn->mode, "RGB") == 0 || strcmp(imIn->mode, "RGBA") == 0 || + strcmp(imIn->mode, "RGBa") == 0 || strcmp(imIn->mode, "RGBX") == 0 || strcmp(imIn->mode, "CMYK") == 0 || strcmp(imIn->mode, "L") == 0 || - strcmp(imIn->mode, "LA") == 0)) + strcmp(imIn->mode, "LA") == 0 || + strcmp(imIn->mode, "La") == 0)) return ImagingError_ModeError(); imTransposed = ImagingNew(imIn->mode, imIn->ysize, imIn->xsize);