Matthew Tretter
164a4e11fc
Some documentation
2012-02-11 00:15:58 -05:00
Matthew Tretter
1956e16b4b
Only invalidate spec file if source changes
2012-02-11 00:04:56 -05:00
Matthew Tretter
60a8c06336
Rename DefaultCacheStateBackend
...
PessimisticCacheStateBackend more accurately describes what is is,
instead of how it's used.
2012-02-10 22:08:13 -05:00
Matthew Tretter
35b807cfa9
generate method (optionally) saves file
...
This way, there's a creation counterpart to `delete()`. The user
shouldn't have to deal with storage backends to create and delete the
files, and now they don't.
2012-02-03 09:16:50 -05:00
Matthew Tretter
513b23b169
Rename force flag to force-revalidation
2012-02-02 23:23:20 -05:00
Matthew Tretter
011c0c2e5f
Add clear method for when future validation is unwanted
2012-02-02 23:21:00 -05:00
Matthew Tretter
8b6ba687e4
Commands for validating and invalidating the cache
2012-02-02 00:19:46 -05:00
Matthew Tretter
c4fc09c688
Fix var name typo
2012-02-02 00:08:22 -05:00
Matthew Tretter
a668df1c37
Spec files now accessible through _ik attr
2012-02-01 23:26:39 -05:00
Matthew Tretter
a1638127cf
Remove unused import
2012-02-01 22:41:33 -05:00
Matthew Tretter
62ff07bf1f
First shot at cache state backend implementation
2012-02-01 22:37:58 -05:00
Timothée Peignier
eb801d75f5
small pep8 formatting fix
2012-01-27 13:45:22 +01:00
Matthew Tretter
343f14ad48
Use old-style string formatting
2012-01-26 18:19:39 -05:00
Timothée Peignier
3bac472561
ImageSpec accepts callable processors arg
2012-01-26 11:01:58 -05:00
Matthew Tretter
6333ee5d05
Makes Adjust transparency-compatible
...
And closes #64 !
2012-01-03 18:57:32 -05:00
Bryan Veloso
3bacd51ba5
Bumping the version number.
2011-12-22 22:14:14 -08:00
Matthew Tretter
e574f1190f
Merge pull request #73 from cyberdelia/fix-transpose-exif
...
Catch error when exif data doesn't exist
2011-12-07 21:37:48 -08:00
Matthew Tretter
dd28557323
Change handling of spec deletion
...
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.
2011-12-07 00:52:06 -05:00
Matthew Tretter
081a0a0d0f
No need to check for None
...
`get_spec_files` will never return it.
2011-12-07 00:37:52 -05:00
Kevin Postal
eda3fc3c91
Catch KeyError on image.info dictionary
2011-12-06 23:29:30 -05:00
Matthew Tretter
8bab75b331
Merge pull request #66 from matthewwithanm/trimcolor-processor
...
Processor for trimming solid-color borders
2011-12-06 10:04:39 -08:00
Matthew Tretter
358bb1f6b0
Using difference instead of subtract
...
This corrects the border removal, however, I'm not certain whether the
interpretation of "tolerance" gels with expectations.
2011-12-06 12:56:50 -05:00
Matthew Tretter
96878105e9
Indentation tweak
2011-12-02 02:46:27 -05:00
Matthew Tretter
eb425fbae9
Makes evaluation of source_file lazy
...
This paves the way for future updates that will fix bugs related to
specs not reflecting updates to their source image fields.
2011-12-02 02:28:08 -05:00
Timothée Peignier
54d5237adc
avoid Transpose to crash when exif data doesn't exists
2011-11-28 16:00:34 +01:00
Matthew Tretter
ee1fb7f943
Allows None value for processors argument
...
Fixes #70
2011-11-23 19:34:59 -05:00
Matthew Tretter
5ecdeb1209
Remove _Resize class
...
It once had a purpose, but it hasn't for a while.
2011-11-22 23:41:18 -05:00
Matthew Tretter
25be1f66ca
Explicitly import crop module
...
So you can `import crop from imagekit.processors`
2011-11-16 15:17:11 -05:00
Matthew Tretter
ed64032762
Renames processor to TrimBorderColor
2011-11-16 15:16:24 -05:00
Matthew Tretter
62d39ccf9e
Gives precedence to user options
...
Previously, options set by `AutoConvert` had higher precedence than
those explicitly passed by the user. This corrects that.
2011-11-16 10:27:18 -05:00
Matthew Tretter
788365d6db
Replaces quality argument with options dict
...
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).
2011-11-16 10:00:35 -05:00
Matthew Tretter
cfd503a2eb
TrimColor processor
2011-11-16 00:11:05 -05:00
FI$H 2000
7ce43309ad
Adds SmartCrop resize processor, with tests.
2011-11-10 10:54:58 -05:00
Bryan Veloso
78709be23c
We're at 1.1.0dev, for real this time.
2011-11-10 15:39:47 +09:00
Bryan Veloso
83cc7f4cc3
Bumping version numbers.
2011-11-10 15:30:01 +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
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
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
44392b7b24
Bumping version numbers.
2011-11-03 14:15:03 +09:00