promote JpegPresets from autodoc section

This commit is contained in:
nulano 2020-06-14 13:46:52 +02:00
parent 4a9afc79bf
commit f19e3ec124
4 changed files with 17 additions and 12 deletions

View File

@ -70,14 +70,6 @@ can be found here.
:undoc-members: :undoc-members:
:show-inheritance: :show-inheritance:
:mod:`JpegPresets` Module
-------------------------
.. automodule:: PIL.JpegPresets
:members:
:undoc-members:
:show-inheritance:
:mod:`PaletteFile` Module :mod:`PaletteFile` Module
------------------------- -------------------------

View File

@ -0,0 +1,11 @@
.. py:currentmodule:: PIL.JpegPresets
:py:mod:`JpegPresets` Module
============================
.. automodule:: PIL.JpegPresets
.. data:: presets
:annotation:
A dict of all supported presets.

View File

@ -28,6 +28,7 @@ Reference
ImageWin ImageWin
ExifTags ExifTags
TiffTags TiffTags
JpegPresets
PSDraw PSDraw
PixelAccess PixelAccess
PyAccess PyAccess

View File

@ -1,9 +1,11 @@
""" """
JPEG quality settings equivalent to the Photoshop settings. JPEG quality settings equivalent to the Photoshop settings.
Can be used when saving JPEG files.
More presets can be added to the presets dict if needed. The following presets are available by default:
``web_low``, ``web_medium``, ``web_high``, ``web_very_high``, ``web_maximum``,
Can be use when saving JPEG file. ``low``, ``medium``, ``high``, ``maximum``.
More presets can be added to the :py:data:`presets` dict if needed.
To apply the preset, specify:: To apply the preset, specify::
@ -21,7 +23,6 @@ Example::
im.save("image_name.jpg", quality="web_high") im.save("image_name.jpg", quality="web_high")
Subsampling Subsampling
----------- -----------