From 4e9a8ef7d7598b13df8880309adcafaef6e23f28 Mon Sep 17 00:00:00 2001 From: Angel Nunez Mencias Date: Sun, 12 May 2013 02:34:07 +0200 Subject: [PATCH] Use the JPEG Plugin save instead of calling the ImageFile directly --- PIL/PdfImagePlugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PIL/PdfImagePlugin.py b/PIL/PdfImagePlugin.py index a9d8f4e41..725f22ecf 100644 --- a/PIL/PdfImagePlugin.py +++ b/PIL/PdfImagePlugin.py @@ -149,7 +149,7 @@ def _save(im, fp, filename): im.putdata(data) ImageFile._save(im, op, [("hex", (0,0)+im.size, 0, im.mode)]) elif filter == "/DCTDecode": - ImageFile._save(im, op, [("jpeg", (0,0)+im.size, 0, im.mode)]) + Image.SAVE["JPEG"](im, op, filename) elif filter == "/FlateDecode": ImageFile._save(im, op, [("zip", (0,0)+im.size, 0, im.mode)]) elif filter == "/RunLengthDecode":