Matthew Tretter
75db5db073
Default anchor to CENTER
...
This was accidentally lost in 88cda1b0b3 .
2012-02-11 15:16:28 -05:00
Matthew Tretter
57056c021d
Add SmartFill processor
...
The simplicity is what makes it so attractive.
2012-02-11 15:12:24 -05:00
Matthew Tretter
ce7353b0bd
Extract Cover processor from Fill
...
This will also be used by `SmartFill`, so we might as well centralize it.
2012-02-11 15:01:59 -05:00
Matthew Tretter
88cda1b0b3
Clean up Crop processor
...
Also, finally allowing arbitrary anchors (specified in percentages).
2012-02-11 14:52:43 -05:00
Matthew Tretter
b4b64a4863
Avoid duplication of cropping code
...
`Fill` is just a resize followed by a crop, so we might as well make
use of the processors we already have.
2012-02-11 14:25:06 -05:00
Matthew Tretter
16110a0f1c
Remove print statement
2012-02-11 14:13:57 -05:00
Matthew Tretter
1ffc8ca81e
Remove duplicate resize.Crop
...
`resize.Crop` actually hasn't been moved to `crop.Crop` (as the removed
class claimed). In fact, what used to be called `resize.Crop` is now
`resize.Fill`. The confusion is understandable, since it's what
motivated the change in the first place!
2012-02-11 14:11:07 -05:00
Madis Väin
6dd0d2272f
write the processors talked about in issue #93
2012-02-11 13:50:12 -05:00
Matthew Tretter
2467dfe912
Rename resize.Crop to resize.Fill
2012-02-11 13:36:30 -05:00
Matthew Tretter
c3ef5172c3
Rename ImageSpec to ImageSpecField
...
The ImageSpec class remains for now, but using it throws
deprecation warnings.
2012-02-11 13:06:48 -05:00
Matthew Tretter
c2a4d01b7c
Only one return
2012-02-10 22:04:20 -05:00
Matthew Tretter
09b97ee62f
Move SmartCrop to crop module
...
Addresses one of the issues raised by in @madisvain in #93
2012-02-10 19:42:36 -05:00
Jan Sagemueller
a041302c96
Resize processor: Add mat_color option to enforce the targeted image size
2012-02-08 09:25:37 -05:00
Timothée Peignier
eb801d75f5
small pep8 formatting fix
2012-01-27 13:45:22 +01:00
Matthew Tretter
6333ee5d05
Makes Adjust transparency-compatible
...
And closes #64 !
2012-01-03 18:57:32 -05: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
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
Timothée Peignier
54d5237adc
avoid Transpose to crash when exif data doesn't exists
2011-11-28 16:00:34 +01: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
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
Timothée Peignier
a0f2db4d29
avoid Transpose to crash when there is no exif data
2011-11-04 12:00:19 +01:00
Bryan Veloso
06c1c678b6
PEP8-ing and whitespacing.
2011-10-31 23:12:03 +09:00
Bryan Veloso
6adadafc74
PEP8 and import tweaks.
2011-10-20 12:12:47 +09:00
Eric Eldredge
67477a6e15
Adds explicit import of resize module to processors
...
This way users can write 'from imagekit.processors import *' and also use the
resize processors like so: 'resize.Crop(50, 50)'
2011-09-26 16:45:45 -04:00
Matthew Tretter
da00e2a5da
Moved Crop and Fit to resize module.
...
Crop doesn't necessarily imply the any scaling is taking place. Several
ideas were discussed, from renaming Crop to combining both processors
into a single Resize processor (as they were in the original IK), but
those solutions were felt to either precluded future extension
(alternative resize modes) or make the API too verbose.
2011-09-26 14:40:48 -04:00