Commit graph

877 commits

Author SHA1 Message Date
Bryan Veloso
3bd7b59046 Fixing some spelling errors, thanks @ptone. 2011-11-10 15:51:48 +09:00
Bryan Veloso
78709be23c We're at 1.1.0dev, for real this time. 2011-11-10 15:39:47 +09:00
Bryan Veloso
99120ef63b Merge branch 'release/1.0.3' into develop
* release/1.0.3:
  Bumping version numbers.
  Changelog for 1.0.3.
2011-11-10 15:30:53 +09:00
Bryan Veloso
c16292e372 Merge branch 'release/1.0.3'
* 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
2011-11-10 15:30:48 +09:00
Bryan Veloso
83cc7f4cc3 Bumping version numbers. 2011-11-10 15:30:01 +09:00
Bryan Veloso
6f8ea4911c Changelog for 1.0.3. 2011-11-10 15:28:40 +09:00
Matthew Tretter
7e5491cc3e Reset file pointer before opening image. Fixes #47 2011-11-08 20:53:48 -05:00
Matthew Tretter
cfa3d01f54 Rename _create() to generate()
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.
2011-11-07 23:07:09 -05:00
Matthew Tretter
8c9a9b8d5c AutoConvert processor
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.
2011-11-06 21:44:31 -05:00
Matthew Tretter
f4b9d74335 Smarter transparency handling
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.
2011-11-06 01:19:32 -05:00
Matthew Tretter
8911836b53 Change how we set ImageFile.MAXBLOCK
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.
2011-11-05 21:20:36 -04:00
Matthew Tretter
7ab1d08e49 Merge pull request #52 from islavov/patch-1
FIX: RGBA mode breaks transparency check
2011-11-05 11:55:10 -07:00
iu_long
ae8a3b8ef8 RGBA is a transparent image mode too . When saving RGBA, you cannot specify 'transparency' color - you get IOError wrong mode. 2011-11-05 18:25:17 +02:00
Matthew Tretter
dd7ae5a8e4 Increase MAXBLOCK on save failure
Under certain circumstances, saving a JPEG may fail if MAXBLOCK isn't
large enough, so we (temporarily) increase it. This should fix #50.
2011-11-04 22:43:41 -04:00
Bryan Veloso
486fb51a1e Merge pull request #49 from cyberdelia/fix-empty-exif-data
Avoid Transpose to crash when there is no exif data.
2011-11-04 04:50:19 -07:00
Bryan Veloso
e2796b5984 Merge pull request #48 from ptone/open_image_improvement
Open image improvement. Closes #47.
2011-11-04 04:49:27 -07:00
Timothée Peignier
a0f2db4d29 avoid Transpose to crash when there is no exif data 2011-11-04 12:00:19 +01:00
ptone
18349a053f Try to better handle being passed a open file with write mode enabled
such as would be the case with tempfile.mkstemp etc
2011-11-04 00:11:22 -07:00
ptone
115baa9a97 Merge branch 'develop' of git://github.com/jdriscoll/django-imagekit into develop
* 'develop' of git://github.com/jdriscoll/django-imagekit:
  `format_to_extension` correctly handles `None` arg
  Proper handling of empty images and missing fields
  Fixes error message
2011-11-03 23:36:32 -07:00
Matthew Tretter
dd642fd05b format_to_extension correctly handles None arg 2011-11-03 15:00:40 -04:00
Matthew Tretter
3022eb037d Proper handling of empty images and missing fields
Fixes #42
2011-11-03 12:33:22 -04:00
Matthew Tretter
bbc0bffd88 Fixes error message
Arguments were in the wrong order. Also, shows class name in string
representation of instance isn't helpful.
2011-11-03 12:26:23 -04:00
Bryan Veloso
2cb8d5d407 Merge branch 'release/1.0.2' into develop
* release/1.0.2:
  Fixing some reST syntax.
  Bumping version numbers.
2011-11-03 14:20:01 +09:00
Bryan Veloso
3fd2450e8d Merge branch 'release/1.0.2'
* 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.
2011-11-03 14:19:20 +09:00
Bryan Veloso
5666a640f0 Fixing some reST syntax. 2011-11-03 14:16:08 +09:00
Bryan Veloso
44392b7b24 Bumping version numbers. 2011-11-03 14:15:03 +09:00
Bryan Veloso
026955711e Adding a changelog. 2011-11-03 14:12:18 +09:00
Bryan Veloso
0f7c400239 Basic tests for extension_to_format and format_to_extension. References #45. 2011-11-03 02:57:01 +09:00
Matthew Tretter
f1b1f2ec71 Fix in format_to_extension mapping 2011-11-02 12:21:45 -04:00
Matthew Tretter
14bac58373 On-demand loading of PIL plugins 2011-11-02 11:26:24 -04:00
Bryan Veloso
dbc225466a Merge pull request #43 from deepakprakash/develop
Fix conversion of PNG "palette" or "P" mode images to JPEG. Fixes #41.
2011-11-02 02:24:48 -07:00
deepakprakash
d36e624acb 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.
2011-11-02 14:25:22 +05:30
Bryan Veloso
5985def06b Back to dev. 2011-11-02 13:49:17 +09:00
Bryan Veloso
58a1f35425 Merge branch 'release/1.0.1' into develop
* release/1.0.1:
  Bumping docs to 1.0.1.
  Bumping version to 1.0.1.
2011-11-02 13:48:06 +09:00
Bryan Veloso
d9a7640d56 Merge branch 'release/1.0.1'
* 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.
2011-11-02 13:47:32 +09:00
Bryan Veloso
3985629b9a Bumping docs to 1.0.1. 2011-11-02 13:46:23 +09:00
Bryan Veloso
2e27e82832 Bumping version to 1.0.1. 2011-11-02 13:45:10 +09:00
Bryan Veloso
023f8592d7 Making sure the templates make it via pip. Fixes #39. 2011-11-02 13:42:35 +09:00
Matthew Tretter
8885325bfc Generated filename is cached 2011-11-01 19:39:54 -04:00
Matthew Tretter
892cce7c7f Fixes extension guessing based on image format
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.
2011-11-01 18:54:18 -04:00
Bryan Veloso
4b86e37f93 No longer an alpha. 2011-11-01 01:54:31 +09:00
Bryan Veloso
a2296a382b Including README.rst and the docs in MANIFEST.in. Fixes #40. 2011-11-01 01:37:29 +09:00
Bryan Veloso
28f4dd0103 Develop is now v1.1.0.dev. 2011-11-01 00:44:29 +09:00
Matthew Tretter
72ba73a431 Merge pull request #38 from jezdez/develop
Slightly updated README to correctly render as reStructuredText.
2011-10-31 08:27:03 -07:00
Jannis Leidel
4555df03d0 Slightly updated README to correctly render as reStructuredText. 2011-10-31 16:24:29 +01:00
Bryan Veloso
11c1259ba3 Merge branch 'release/1.0.0' into develop
* release/1.0.0: (68 commits)
  Tests now run again.
  PEP8-ing and whitespacing.
  Requiring versiontools and patching up our setup.py.
  adding introspection rule for users with south
  PEP8 and import tweaks.
  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.
  ...

Conflicts:
	README.rst
2011-10-31 23:32:39 +09:00
Bryan Veloso
7e55f5e087 Merge branch 'release/1.0.0'
* release/1.0.0: (68 commits)
  Tests now run again.
  PEP8-ing and whitespacing.
  Requiring versiontools and patching up our setup.py.
  adding introspection rule for users with south
  PEP8 and import tweaks.
  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.
  ...

Conflicts:
	README.rst
2011-10-31 23:30:09 +09:00
Bryan Veloso
f47c4f9e8b Tests now run again. 2011-10-31 23:23:50 +09:00
Bryan Veloso
06c1c678b6 PEP8-ing and whitespacing. 2011-10-31 23:12:03 +09:00
Bryan Veloso
a45f3af2a5 Requiring versiontools and patching up our setup.py. 2011-10-31 23:01:41 +09:00