Commit graph

15 commits

Author SHA1 Message Date
Matthew Tretter
0ef56e1aaa process() accepts file
In the old IK API, processors (like `Transpose`) were able to access
the file by inspecting the model instance (which carried an options
object that specified the attribute name of the ImageField from which
the file could be extracted). Since the new API allows for multiple
ImageFields (and because IKOptions have been removed), it became
necessary to provide more information. Initially, this was accomplished
by passing the spec to `process()`, however with the addition of
ProcessedImageField, it became clear the a cleaner solution was to pass
only the field file (ImageSpecFile or ProcessedImageFieldFile).

This keeps the ORM stuff (fields, etc.) out of the `ImageProcessor` API
but (because field files, not just regular files, are passed) the
average hacker can still have their processor make use of model
information by accessing the model through the file's `instance`
property.
2011-09-22 17:58:33 -04:00
Matthew Tretter
bd7eb7284b BoundImageSpec is now ImageSpecFile
In preparation for unifying the ImageSpecFile and
ProcessedImageFieldFile interfaces.
2011-09-22 09:20:37 -04:00
Matthew Tretter
4e23254e73 Crop processor accepts anchor argument. 2011-09-21 19:02:18 -04:00
Matthew Tretter
e4c4fe02b3 Separated Crop.process() and Fit.process()
They didn't have enough in common to warrant them being branches of the
same method.
2011-09-21 18:24:02 -04:00
Matthew Tretter
a71b3ca337 Removed Format processor
The Format processor was really a special case and didn't do any
processing at all. Instead, ImageSpec just knew to look for it and
responded accordingly. Therefore, it's been replaced with a `format`
property on ImageSpec. This warranted a deeper look at how the format
and extension were being deduced (when not explicitly provided); the
results are documented in-code, though the goal was "no surprises."
2011-09-20 21:34:00 -04:00
Matthew Tretter
4c78f2d24c _imgfield is now a property of ImageSpec
Moved _imgfield from ImageModel to ImageSpec. Theoretically, this will allow you
to have specs that use different image fields on the same model.
2011-09-10 00:24:37 -04:00
Matthew Tretter
a1f11facbe Processors now use static properties. 2011-09-08 16:49:44 -04:00
Matthew Tretter
e32ccb617d Resize split into Crop and Fit. 2011-09-08 10:28:54 -04:00
Matthew Tretter
cd3395b68f Processors are now instance-based. 2011-09-08 10:28:50 -04:00
Justin Driscoll
125c2c1470 Cleaned up trailing whitespace 2009-12-19 11:01:54 -05:00
Justin Driscoll
eb97ed1180 spec.name now respects the upload_to path and added additional error handling to Transpose:auto 2009-07-19 15:26:53 -04:00
Justin Driscoll
68b8d46a2f Added 'auto' method to Transpose processor 2009-07-19 15:04:43 -04:00
Justin Driscoll
70da53ba4d Added format processor to force a format/extension change 2009-06-04 11:47:16 -04:00
Justin Driscoll
47e087e3b4 Fixed handling of palleted images 2009-06-04 11:06:11 -04:00
Ariel Nunez
920bf47128 Added setup.py and relocated source dir 2009-02-02 15:46:41 -05:00
Renamed from src/imagekit/processors.py (Browse further)