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.
* release/1.0.2:
Fixing some reST syntax.
Bumping version numbers.
Adding a changelog.
Basic tests for extension_to_format and format_to_extension. References #45.
Fix in `format_to_extension` mapping
On-demand loading of PIL plugins
Fix conversion of PNG "palette" or "P" mode images to JPEG. "P" mode images need to be converted to 'RGB' if target image format is not PNG or GIF.
Back to dev.
* release/1.0.1:
Bumping docs to 1.0.1.
Bumping version to 1.0.1.
Making sure the templates make it via pip. Fixes#39.
Generated filename is cached
Fixes extension guessing based on image format
No longer an alpha.
Including README.rst and the docs in MANIFEST.in. Fixes#40.
Develop is now v1.1.0.dev.
Slightly updated README to correctly render as reStructuredText.
IK relies on PIL's EXTENSION list to map formats to extensions.
However, this list normally isn't populated until an image is loaded.
This change forces the population of the list before examining it.