* release/1.1.0: (28 commits)
Adding (crude) changelog information for 1.1.0.
Bumping the version number.
Removing Pillow from requirements.txt and adding a note about PIL/Pillow to the README. References #72.
Being a bit friendlier to Python 2.5 users... or is it 2.4. Fixes#82.
Change handling of spec deletion
No need to check for None
Catch KeyError on image.info dictionary
Using difference instead of subtract
Indentation tweak
Makes evaluation of `source_file` lazy
Test illustrating #75, #74
Separate create_photo method
avoid Transpose to crash when exif data doesn't exists
Allows `None` value for `processors` argument
Remove _Resize class
Adds crop module to docs
Explicitly import crop module
Renames processor to `TrimBorderColor`
Gives precedence to user options
Replaces `quality` argument with `options` dict
...
Though it's not the case with `FileSystemStorage`, attempting to delete
a nonexistent file can cause an exception (as in #80). We want to avoid
these errors but don't want to suppress others raised in the process of
deleting the file, so we first check to see if the file exists.
The `options` argument for `ImageSpec` and `ProcessedImageField`
replaces `quality` and provides a more general solution, allowing the
user access to PIL's format-specific options (including "quality",
"progressive", and "optimize" for JPEGs).
* release/1.0.3:
Bumping version numbers.
Changelog for 1.0.3.
Reset file pointer before opening image. Fixes#47
Rename `_create()` to `generate()`
AutoConvert processor
Smarter transparency handling
Change how we set `ImageFile.MAXBLOCK`
RGBA is a transparent image mode too . When saving RGBA, you cannot specify 'transparency' color - you get IOError wrong mode.
Increase MAXBLOCK on save failure
avoid Transpose to crash when there is no exif data
Try to better handle being passed a open file with write mode enabled
`format_to_extension` correctly handles `None` arg
Proper handling of empty images and missing fields
Fixes error message
After #51 presented a good use case, we decided to make this part of
the API (i.e. remove the underscore). The default value for the `lazy`
kwarg is changed to `True` to reduce the likelihood of accidental
regeneration of images. Closes#54.
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.