Signals are now connected without specifying the class and non-IK
models are filtered out in the receivers. This is necessary because of
a bug with how Django handles abstract models.
Closes#126
At first, we only had a small amount of code for preserving
transparency in `img_to_fobj`, but as that code grew it became apparent
that it really didn't belong in the utility function. This commit
creates an `AutoConvert` processor which is automatically run before
saving unless you disable it by passing `autoconvert=False` to your
`ImageSpec` or `ProcessedImageField` constructor. `img_to_fobj` is once
again a simple utility function for creating a file object from a PIL
image.
The in-code comments explain it pretty thoroughly but, in short, this
handles a lot more of the situations in which you're converting to or
from formats that support transparency.
Previously, we set it to an arbitrary large number (which turned out
not to be large enough in some cases). Since we may have been
overriding something the user explicitly chose (and our value may be
overridden by another app), that probably wasn't good. After this
change, `MAXBLOCK` is only increased when it needs to be--and even
then, only temporarily.
* 'new_api' of https://github.com/matthewwithanm/django-imagekit: (63 commits)
fixing typo
ImageSpecFile is a proper File
Typo fix
A list of ImageSpec names are now stored on the model.
AdminThumbnailView is now AdminThumbnail
Docs typo fix
Adds explicit import of resize module to processors
fixing bad import in docs
adding name to AUTHORS
adding test for new api
Moved Crop and Fit to resize module.
More docs edits.
Typo fix.
Installation instructions.
Embracing duck typing.
Documentation!
Fix bug
Bound fields are now cached on the model instance.
Transpose processor now supports auto EXIF orientation.
Fix filename formatting.
...
Conflicts:
AUTHORS
README.rst
docs/Makefile
docs/conf.py
docs/index.rst
imagekit/__init__.py
imagekit/defaults.py
imagekit/management/commands/ikflush.py
imagekit/models.py
imagekit/options.py
imagekit/processors.py
imagekit/specs.py
tests/core/tests.py
Previously, ImageSpecFile instances were retrieved (for saving and deleting,
among other possibilities) by iterating over the model instance's attributes.
This change adds ImageSpecFile names to a list (spec_file_names) on an
imagekit meta object on the model (_ik), making later retrieval much cheaper
and more straightforward.
Replaced calls to Image.open with an open_image utility function.
The open_image utility calls Image.open, but then wraps the opened Image's
copy method with a version that preserves EXIF data. This allows an
ImageSpec to copy the original image, yet still provide all the original
image's exif data to the processor pipeline.