Skip to content
This repository has been archived by the owner on Sep 22, 2020. It is now read-only.

Commit

Permalink
Add documentation of colormode
Browse files Browse the repository at this point in the history
  • Loading branch information
relekang committed Mar 29, 2015
1 parent 65867f9 commit ecaf1e9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
~~~~~
- Add Django templatetag ``get_thumbnail``
- Catch IOError and OSError in PillowEngine.engine_load_image and throw ThumbnailError, which
will be catched in get_thumbnail if ``THUMBNAIL_DEBUG = False``.
will be caught in get_thumbnail if ``THUMBNAIL_DEBUG = False``.

0.2.1
~~~~~
Expand Down
8 changes: 8 additions & 0 deletions docs/settings.rst
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,14 @@ Image options
| Quality sent to the engine.
| **Default:** ``90``
.. attribute:: THUMBNAIL_COLORMODE
:noindex:

| The default colormode for thumbnails. Supports all values supported by pillow. In other
engines there is a best effort translation from pillow modes to the modes supported by the
current engine.
| **Default:** ``'RGB'``
.. attribute:: THUMBNAIL_ALTERNATIVE_RESOLUTIONS
:noindex:

Expand Down
4 changes: 4 additions & 0 deletions thumbnails/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ def get_thumbnail(original, size, **options):
saving the thumbnail.
:param scale_up: Overrides ``THUMBNAIL_SCALE_UP``, if set to ``True`` the image will be scaled
up if necessary.
:param colormode: Overrides ``THUMBNAIL_COLORMODE``, The default colormode for thumbnails.
Supports all values supported by pillow. In other engines there is a best
effort translation from pillow modes to the modes supported by the current
engine.
:return: A Thumbnail object
"""
engine = helpers.get_engine()
Expand Down

0 comments on commit ecaf1e9

Please sign in to comment.