Use the JPEG Plugin save instead of calling the ImageFile directly

This commit is contained in:
Angel Nunez Mencias 2013-05-12 02:34:07 +02:00
parent 04c1aee829
commit 4e9a8ef7d7

View File

@ -149,7 +149,7 @@ def _save(im, fp, filename):
im.putdata(data) im.putdata(data)
ImageFile._save(im, op, [("hex", (0,0)+im.size, 0, im.mode)]) ImageFile._save(im, op, [("hex", (0,0)+im.size, 0, im.mode)])
elif filter == "/DCTDecode": elif filter == "/DCTDecode":
ImageFile._save(im, op, [("jpeg", (0,0)+im.size, 0, im.mode)]) Image.SAVE["JPEG"](im, op, filename)
elif filter == "/FlateDecode": elif filter == "/FlateDecode":
ImageFile._save(im, op, [("zip", (0,0)+im.size, 0, im.mode)]) ImageFile._save(im, op, [("zip", (0,0)+im.size, 0, im.mode)])
elif filter == "/RunLengthDecode": elif filter == "/RunLengthDecode":