diff --git a/src/PIL/ImageCms.py b/src/PIL/ImageCms.py index f028f177533..b6c5de5b36f 100644 --- a/src/PIL/ImageCms.py +++ b/src/PIL/ImageCms.py @@ -349,7 +349,6 @@ def point(self, im: Image.Image) -> Image.Image: return self.apply(im) def apply(self, im: Image.Image, imOut: Image.Image | None = None) -> Image.Image: - im.load() if imOut is None: imOut = Image.new(self.output_mode, im.size, None) self.transform.apply(im.getim(), imOut.getim()) @@ -357,7 +356,6 @@ def apply(self, im: Image.Image, imOut: Image.Image | None = None) -> Image.Imag return imOut def apply_in_place(self, im: Image.Image) -> Image.Image: - im.load() if im.mode != self.output_mode: msg = "mode mismatch" raise ValueError(msg) # wrong output mode diff --git a/src/PIL/ImageMath.py b/src/PIL/ImageMath.py index ff3014a8d5a..773147b5343 100644 --- a/src/PIL/ImageMath.py +++ b/src/PIL/ImageMath.py @@ -59,7 +59,6 @@ def apply( if im2 is None: # unary operation out = Image.new(mode or im_1.mode, im_1.size, None) - im_1.load() try: op = getattr(_imagingmath, f"{op}_{im_1.mode}") except AttributeError as e: @@ -86,7 +85,6 @@ def apply( if im_2.size != size: im_2 = im_2.crop((0, 0) + size) out = Image.new(mode or im_1.mode, im_1.size, None) - im_1.load() try: op = getattr(_imagingmath, f"{op}_{im_1.mode}") except AttributeError as e: