From 16a0a640f2af190d44a8c4e0ca5c9118bcba44a7 Mon Sep 17 00:00:00 2001 From: Esteban Santana Santana Date: Wed, 20 Nov 2013 01:14:51 -0600 Subject: [PATCH] =?UTF-8?q?Added=20documentation=20for=20the=20newly=20add?= =?UTF-8?q?ed=20scale=20argument=20to=20EPS=E2=80=99s=20load()=20function.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/handbook/image-file-formats.rst | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/handbook/image-file-formats.rst b/docs/handbook/image-file-formats.rst index 93edebf4e..d0595711e 100644 --- a/docs/handbook/image-file-formats.rst +++ b/docs/handbook/image-file-formats.rst @@ -36,6 +36,20 @@ PIL identifies EPS files containing image data, and can read files that contain embedded raster images (ImageData descriptors). If Ghostscript is available, other EPS files can be read as well. The EPS driver can also write EPS images. +If Ghostscript is available, you can call the :py:meth:`~PIL.Image.Image.load` +method with the following parameter to affect how Ghostscript renders the EPS + +**scale** + Affects the scale of the resultant rasterized image. If the EPS suggests + that the image be rendered at 100px x 100px, setting this parameter to + 2 will make the Ghostscript render a 200px x 200px image instead. The + relative position of the bounding box is maintained:: + + im = Image.open(...) + im.size #(100,100) + im.load(scale=2) + im.size #(200,200) + GIF ^^^ @@ -273,19 +287,19 @@ format are currently undocumented. The :py:meth:`~PIL.Image.Image.save` method supports the following options: -**lossless** +**lossless** If present, instructs the WEBP writer to use lossless compression. -**quality** +**quality** Integer, 1-100, Defaults to 80. Sets the quality level for lossy compression. -**icc_procfile** +**icc_procfile** The ICC Profile to include in the saved file. Only supported if the system webp library was built with webpmux support. -**exif** +**exif** The exif data to include in the saved file. Only supported if the system webp library was built with webpmux support.