Commit graph

309 commits

Author SHA1 Message Date
Bryan Veloso
49da2b22f6 Adding @kennethreitz's Sphinx style. 2012-01-06 01:52:56 -08:00
Bryan Veloso
cf8ec71e00 reST slays me. :( 2012-01-06 01:52:56 -08:00
Matthew Tretter
6333ee5d05 Makes Adjust transparency-compatible
And closes #64!
2012-01-03 18:57:32 -05:00
Bryan Veloso
c5c0402c89 Merge branch 'release/1.1.0' into develop
* release/1.1.0:
  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.
2011-12-22 22:18:51 -08:00
Bryan Veloso
68763fa5b1 Adding (crude) changelog information for 1.1.0. 2011-12-22 22:14:32 -08:00
Bryan Veloso
3bacd51ba5 Bumping the version number. 2011-12-22 22:14:14 -08:00
Bryan Veloso
2a275f094c Removing Pillow from requirements.txt and adding a note about PIL/Pillow to the README. References #72. 2011-12-22 21:58:42 -08:00
Bryan Veloso
c16b008a34 Being a bit friendlier to Python 2.5 users... or is it 2.4. Fixes #82. 2011-12-22 21:48:15 -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
Matthew Tretter
d036343adc Test illustrating #75, #74 2011-12-02 02:19:27 -05:00
Matthew Tretter
1137487689 Separate create_photo method 2011-12-02 02:19:12 -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
5579c8db3c Adds crop module to docs 2011-11-22 23:12:54 -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
Chris Drackett
b89bc96e4b Merge pull request #68 from matthewwithanm/options-arg
Replaces `quality` argument with `options` dict
2011-11-16 08:36:37 -08: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
Bryan Veloso
8c64307e5a Moving Matt to maintainers. 2011-11-11 16:20:13 +09:00
Bryan Veloso
25a7536a26 Adding Alexander Bohn (@fish2000) to AUTHORS. 2011-11-11 16:19:28 +09:00
FI$H 2000
7ce43309ad Adds SmartCrop resize processor, with tests. 2011-11-10 10:54:58 -05:00
Bryan Veloso
2dad6fb88d Adding a requirements.txt file for ReadTheDocs' sake. 2011-11-10 16:05:09 +09:00
Bryan Veloso
882cf87ec3 No longer need this and nothing's pointing to it anyway. 2011-11-10 16:04:49 +09:00
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
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