Commit graph

620 commits

Author SHA1 Message Date
Matthew Tretter
56c66f4883 Back ProcessedImageField with spec registry 2012-10-04 23:15:16 -04:00
Matthew Tretter
82d0e4be73 Remove unused imports 2012-10-04 23:03:22 -04:00
Matthew Tretter
f289ff3199 Back ImageSpecFields with spec registry
This marks a major step towards centralizing some of the "spec" logic
and creating a single access point for them. Because `ImageSpecFields`
are just alternative interfaces for defining and registering specs,
they can be accessed and overridden in the same manner as other specs
(like those used by template tags): via the spec registry.
2012-10-04 22:56:26 -04:00
Matthew Tretter
99ba61d605 Move spec registry 2012-10-04 22:02:29 -04:00
Matthew Tretter
116b0bc0c5 Move spec classes to specs module 2012-10-04 21:58:22 -04:00
Matthew Tretter
30ba1d890e Move exceptions 2012-10-04 21:57:33 -04:00
Matthew Tretter
0cc7938400 Re-integrate receivers module
Somewhere along the line, a change got merged that stopped using the
receivers module. This re-integrates it and moves changes made to the
old receivers (static methods on ImageSpecField) to them.
2012-10-04 21:44:55 -04:00
Matthew Tretter
d2087aa168 Create ImageSpecs; remove generators 2012-10-04 21:37:20 -04:00
Eric Eldredge
2e5489eb56 Merge branch 'ik-next' into templatetags
Conflicts:
	imagekit/models/fields/__init__.py
	imagekit/utils.py
2012-10-04 15:46:50 -04:00
Matthew Tretter
c8778b9cfb Remove print statement 2012-10-03 22:31:45 -04:00
Matthew Tretter
ba9bf1f877 Add image cache strategies
This new feature gives the user more control over *when* their images
are validated. Image cache backends are now exclusively for controlling
the *how*. This means you won't have to write a lot of code when you
just want to change one or the other.
2012-10-03 22:23:11 -04:00
Matthew Tretter
f43bd4ec28 Include source filename in hash 2012-09-15 15:09:58 -04:00
Eric Eldredge
ec9a1f1fda Spec templatetag returns html by default
...if no 'as var' is provided or if the var is printed directly.
2012-09-07 00:25:03 -04:00
Matthew Tretter
8a2738ca8a Add backend for caching image state 2012-09-06 22:11:23 -04:00
Matthew Tretter
2ad3791d9d Reorganize image cache backends 2012-09-06 09:11:18 -04:00
Matthew Tretter
3103ab29bd Remove "non-validating" backend
It's been superseded by the VALIDATE_ON_ACCESS setting
2012-09-06 09:10:05 -04:00
Matthew Tretter
0fc29ee7cf Extract useful backend utils 2012-09-06 09:09:30 -04:00
Matthew Tretter
197dfb3485 Add VALIDATE_ON_ACCESS setting 2012-09-06 09:08:45 -04:00
Eric Eldredge
bdecf75e0a Merge branch 'ik-next' into templatetags 2012-09-05 21:47:39 -04:00
Eric Eldredge
c50e6cea3b Merge branch 'develop' into templatetags
Conflicts:
	imagekit/utils.py
2012-09-05 21:46:59 -04:00
Matthew Tretter
c8733c4707 Change how signals are used
Signals are now connected without specifying the class and non-IK
models are filtered out in the receivers. This is necessary because of
a bug with how Django handles abstract models.

Closes #126
2012-07-25 23:04:21 -04:00
Matthew Tretter
23c6e9a70e Add __init__ to Reflection processor; closes #141 2012-07-25 22:20:15 -04:00
Matthew Tretter
7ad5cf4db5 Use hashes for generated image filenames
While this change means users can no longer specify their own filenames,
changing a property of a processor, for example, will now result in a
new image. This solves a lot of the previous invalidation issues.
2012-07-19 23:48:28 -04:00
Matthew Tretter
a196e00059 Use django-appconf 2012-07-19 21:03:15 -04:00
Matthew Tretter
548fb65618 Allow callables for AdminThumbnail image_field arg
This allows images from related models to be displayed. Closes #138.
2012-07-19 20:08:03 -04:00
Matthew Tretter
becee54c03 Fix pickling of ImageSpecFieldFile
Code now passes the test added in 118f6e4. Hopefully this will
address #97.
2012-07-18 22:25:26 -04:00
Matthew Tretter
c1b4c9bf71 Use cStringIO if available 2012-05-12 15:45:08 -04:00
German M. Bravo
89f2aa7a7d Reflections on images using RGBA 2012-05-12 15:39:36 -04:00
German M. Bravo
784afcc95d Simplified path join for the cache 2012-05-12 15:39:12 -04:00
Bryan Veloso
322c96eec2 Merge branch 'release/2.0.1' into develop
* release/2.0.1:
  Bumping the version number.
  Changelog update.
2012-04-28 11:32:22 -07:00
Jeroen Dekkers
69b590257d Do not leak file descriptor 2012-04-28 16:13:50 +02:00
Bryan Veloso
209afac9e3 Merge branch 'develop' into release/2.0
* develop:
  IKContentFile accepts format hint
  Additional mimetype utils
  Don't get extension of empty filename
  Tell people to import fields from the models module
  Refactored AutoConvert into prepare_image
  Docstring for save_image
  Kill PIL's chattiness; fixes #91
  PIL bug workaround
  Use StringIO instead of temp file
  Extract reusable save_image function
  Rename SpecFile and move it to utils
  Extract suggest_extension util from generator
  Woah, globals
  Add SpecFile.__unicode__
2012-04-24 13:59:28 -07:00
Matthew Tretter
89eb05668e IKContentFile accepts format hint 2012-04-20 23:30:30 -04:00
Matthew Tretter
b466ff3723 Additional mimetype utils 2012-04-20 23:27:35 -04:00
Matthew Tretter
7b34716d9e Don't get extension of empty filename 2012-04-20 23:26:58 -04:00
Matthew Tretter
af7c12cb68 Tell people to import fields from the models module 2012-04-20 21:43:59 -04:00
Matthew Tretter
667e265c94 Refactored AutoConvert into prepare_image
Because of its need to return kwargs for ``Image.save()``, it never
really fit the mold of a processor.
2012-04-20 21:37:43 -04:00
Matthew Tretter
222c9ba22a Docstring for save_image 2012-04-20 21:23:06 -04:00
Matthew Tretter
b6f629d644 Kill PIL's chattiness; fixes #91 2012-04-20 01:55:00 -04:00
Matthew Tretter
5fdf9d6a91 PIL bug workaround 2012-04-20 00:46:35 -04:00
Matthew Tretter
6f8a22c5bf Use StringIO instead of temp file 2012-04-20 00:46:33 -04:00
Matthew Tretter
e0c9708e63 Extract reusable save_image function 2012-04-20 00:46:08 -04:00
Matthew Tretter
7d5937ebe6 Rename SpecFile and move it to utils 2012-04-19 21:33:56 -04:00
Matthew Tretter
8044b97a33 Extract suggest_extension util from generator 2012-04-19 21:33:52 -04:00
Matthew Tretter
6e4a8d1b58 Woah, globals 2012-04-09 21:27:09 -04:00
Clay McClure
db4df4f82c Add SpecFile.__unicode__
SpecFile is based after django.core.files.base.ContentFile, which lacks a __unicode__
method. This leads to an AttributeError when SpecFile.__repr__ is called. This is
easily resolved by giving SpecFile a proper __unicode__ method.
2012-03-27 17:17:54 -04:00
Bryan Veloso
70f80ba7fa Bumping an version number. 2012-03-23 14:32:52 -07:00
Bryan Veloso
1c8987e353 Merge pull request #121 from cyberdelia/celery-improvements
Delete file before re-generating it
2012-03-23 13:04:22 -07:00
Timothée Peignier
39b2feda5a delete file before re-generating it to avoid ill named file 2012-03-23 12:13:53 +01:00
Timothée Peignier
bc7852be21 fix typo in celery backend 2012-03-20 20:06:41 +01:00
Bryan Veloso
c46a403baa Using Django's method of versioning. Also updating the docs' version. 2012-03-20 02:44:53 -07:00
Timothée Peignier
d1af56ba3e ensure task is correctly created 2012-03-15 10:37:28 +01:00
Timothée Peignier
1e4ac109f7 rename async to celery 2012-03-08 19:58:36 +01:00
Timothée Peignier
7af4940914 try to import celery on init 2012-03-05 17:47:19 +01:00
Timothée Peignier
f3976a5c68 change import path 2012-03-05 17:36:08 +01:00
Timothée Peignier
983bceff62 rename CeleryCacheStateBackend as CeleryImageCacheBackend 2012-03-05 17:00:35 +01:00
Timothée Peignier
9fbdd7bef4 import base backends in imagecache module 2012-03-05 16:55:40 +01:00
Timothée Peignier
0fa86f7da8 rename celery module to async 2012-03-05 13:58:09 +01:00
Timothée Peignier
42c79d7bb2 declare celery backends in a separate module 2012-03-05 12:27:53 +01:00
Clay McClure
2cf425d8a3 Wrap ContentFile in a file-like object with a filename and content_type.
This extra layer of indirection allows us to tack some attributes
(name and content_type) onto the underlying file, which we cannot
do with a StringIO since it's a native ctype.

These attributes are used by various third-party software that expects
to work with django.core.files.File instances, and not directly with
StringIO instances. By way of example, the django-storages mosso
backend (CloudFilesStorage) looks for a content_type attribute, and
the cloudfiles Object backend looks for a name attribute.
2012-02-29 05:01:31 -05:00
Matthew Tretter
3a5d7da0d8 Validate the image any time the file is required
This means that accessing `path` or `size` will also validate,
closing #109
2012-02-23 17:46:57 -05:00
Matthew Tretter
8fc71e689a Cover renamed to ResizeToCover 2012-02-18 01:38:19 -05:00
Matthew Tretter
e67934852d Rename processors and clean up packages 2012-02-18 00:20:44 -05:00
Matthew Tretter
3912003f02 Rename Fit and Fill to ResizeToFit and ResizeToFill 2012-02-18 00:05:18 -05:00
Matthew Tretter
5a8564d039 Rename BasicResize to Resize 2012-02-17 23:55:59 -05:00
Matthew Tretter
3fad906305 Remove crop.Crop to avoid confusion with resize.Crop 2012-02-17 23:54:39 -05:00
Matthew Tretter
3e2bd2f21f Crop processor consolidation
BasicCrop is absorbed into Crop and Crop uses ResizeCanvas
2012-02-17 23:22:56 -05:00
Matthew Tretter
a164427074 Don't use Anchor internals; allow any anchor tuple
ResizeCanvas now uses the anchor behavior of the Crop processor
2012-02-17 23:22:49 -05:00
Matthew Tretter
568c3d29a1 Default ResizeCanvas color 2012-02-17 22:39:43 -05:00
Matthew Tretter
6cca16ef99 Allow negative coordinates when using an anchor 2012-02-17 22:38:04 -05:00
Matthew Tretter
dd5efac0eb A little AddBorer cleanup 2012-02-17 22:38:00 -05:00
Matthew Tretter
441266a6d7 Small ResizeCanvas fixes 2012-02-17 22:34:40 -05:00
Jan Sagemueller
b073868bb7 AddBorder, Anchor, and ResizeCanvas processors
[NEW] Processors: AddBorder
[NEW] Processors: Anchor has now its own class, taken from Crop
[CHG] Processors: Renamed Mat => ResizeCanvas, and will now use either
an anchor from Anchor or a user defined pixel offset
2012-02-17 21:48:32 -05:00
Jan Sagemueller
09ecbae143 Resize processor: Externalized transparency padding into new class Mat
Conflicts:

	imagekit/processors/resize.py
2012-02-17 21:47:24 -05:00
Matthew Tretter
b016065807 Fix inheritance of ImageKitMeta objects
Fixes #100
2012-02-17 21:10:09 -05:00
Matthew Tretter
84d36791b8 Pass the pickle test; should fix #97 2012-02-17 20:07:50 -05:00
Matthew Tretter
677c52b730 Rename descriptor and file to match Django 2012-02-17 18:39:51 -05:00
Matthew Tretter
6816196da7 Use "super" 2012-02-17 18:22:05 -05:00
Eduard Iskandarov
fa244cdcc9 fix unicode error 2012-02-16 19:47:22 +06:00
Bryan Veloso
dafbe2040d The serial must be greater than 0 for an alpha release. Fixes #101. Thanks @vesterbaek! 2012-02-15 12:57:36 -08:00
Bryan Veloso
a004071e27 We're in 2.0alpha now, really. 2012-02-14 11:18:36 -08:00
Timothée Peignier
98066eea93 fix import and formatting 2012-02-14 17:34:51 +01:00
Matthew Tretter
938acedcc7 Decorator syntax for registering specs 2012-02-13 22:13:32 -05:00
Matthew Tretter
722a553501 Automatically autodiscover 2012-02-13 22:12:34 -05:00
Matthew Tretter
d275aaa3f7 A little reorganization 2012-02-13 22:12:07 -05:00
Matthew Tretter
807beef418 Centralized spec properies 2012-02-13 21:49:09 -05:00
Matthew Tretter
6a1a22825b Working proof of concept of spec tag 2012-02-13 21:49:09 -05:00
Matthew Tretter
3a3f941e2c Pull field utilities out into their own module 2012-02-13 21:47:53 -05:00
Matthew Tretter
8cdbd96a1f Add files module 2012-02-13 21:44:29 -05:00
Matthew Tretter
c2891090d1 Remove old handlers
They somehow got re-added along the way
2012-02-13 21:38:40 -05:00
Matthew Tretter
b71102e7e8 Correct indentation error 2012-02-13 21:16:45 -05:00
Matthew Tretter
e71432d8ed Undo "return content" removal
I changed my mind. For now, at least.
2012-02-12 17:23:55 -05:00
Matthew Tretter
e31080ff4a Moved SpecFileGenerator to new module 2012-02-12 17:23:53 -05:00
Matthew Tretter
d9abd75d8a Pass storage to generator 2012-02-12 17:23:40 -05:00
Matthew Tretter
ff1b76f923 Remove image cache backend from generator 2012-02-12 17:23:40 -05:00
Matthew Tretter
a668b28257 Fix ProcessedImageField bug
Was using an old method signature
2012-02-12 17:23:40 -05:00
Matthew Tretter
b24fe7b8e0 Cleanup 2012-02-12 17:23:40 -05:00
Matthew Tretter
2a422f5cb6 Decouple generator from model 2012-02-12 17:23:39 -05:00
Matthew Tretter
1054d055fb Rename generate_content to process_content 2012-02-12 17:23:39 -05:00
Matthew Tretter
a7cf79290c Don't return content 2012-02-12 17:23:39 -05:00
Matthew Tretter
4ab5aadec6 Remove process method 2012-02-12 17:23:39 -05:00
Matthew Tretter
146a5ee01c Access generator through field 2012-02-12 17:23:39 -05:00
Matthew Tretter
7d6036aaac Remove cache_to from generator 2012-02-12 17:23:39 -05:00
Matthew Tretter
71c56c7d6a Separate generator 2012-02-12 17:23:39 -05:00
Matthew Tretter
fe1bfa4d1a Fix conflict resolution issues 2012-02-12 17:06:37 -05:00
Bryan Veloso
424659bd07 Merge pull request #95 from jdriscoll/new_processors
New processors
2012-02-12 13:54:12 -08:00
Bryan Veloso
5a31e98b2f Merge remote-tracking branch 'matthewwithanm/whencontrol' into develop
* matthewwithanm/whencontrol:
  Rename cache_state_backend to image_cache_backend
  Add NonValidatingCacheStateBackend
  Some documentation
  Only invalidate spec file if source changes
  Rename DefaultCacheStateBackend
  generate method (optionally) saves file
  Rename force flag to force-revalidation
  Add clear method for when future validation is unwanted
  Commands for validating and invalidating the cache
  Fix var name typo
  Spec files now accessible through _ik attr
  Remove unused import
  First shot at cache state backend implementation

Conflicts:
	imagekit/models/fields.py
2012-02-12 13:48:02 -08:00
Matthew Tretter
e9e364eedd Rename cache_state_backend to image_cache_backend
Related names (like the package and class names) have also been
updated.
2012-02-12 16:18:34 -05:00
Matthew Tretter
2838fa47cd Created "fields" module
This should give us a little more structure as IK grows.
2012-02-12 14:53:49 -05:00
Matthew Tretter
cf821cfecd Documentation 2012-02-11 15:40:16 -05:00
Matthew Tretter
80a26a4f09 Rename crop function to show it's internal 2012-02-11 15:33:25 -05:00
Matthew Tretter
4278a95001 Use BasicCrop in other processors 2012-02-11 15:32:23 -05:00
Matthew Tretter
51212749e9 Improve BasicCrop API as discussed in #94 2012-02-11 15:28:47 -05:00
Matthew Tretter
15e0981835 Use BasicResize for resizing 2012-02-11 15:26:27 -05:00
Matthew Tretter
1a999f23da @madisvain's BasicResize from #94 2012-02-11 15:25:10 -05:00
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
15b15afe2c Add NonValidatingCacheStateBackend 2012-02-11 00:42:56 -05:00
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
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
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
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
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
2e27e82832 Bumping version to 1.0.1. 2011-11-02 13:45:10 +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
28f4dd0103 Develop is now v1.1.0.dev. 2011-11-01 00:44:29 +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
Chris McKenzie
714ff8ae1d adding introspection rule for users with south 2011-10-24 18:18:25 -04:00
Bryan Veloso
6adadafc74 PEP8 and import tweaks. 2011-10-20 12:12:47 +09:00
Bryan Veloso
302399d837 Merge branch 'new_api' of https://github.com/matthewwithanm/django-imagekit into release/1.0.0
* 'new_api' of https://github.com/matthewwithanm/django-imagekit: (63 commits)
  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.
  Documentation!
  Fix bug
  Bound fields are now cached on the model instance.
  Transpose processor now supports auto EXIF orientation.
  Fix filename formatting.
  ...

Conflicts:
	AUTHORS
	README.rst
	docs/Makefile
	docs/conf.py
	docs/index.rst
	imagekit/__init__.py
	imagekit/defaults.py
	imagekit/management/commands/ikflush.py
	imagekit/models.py
	imagekit/options.py
	imagekit/processors.py
	imagekit/specs.py
	tests/core/tests.py
2011-10-20 12:06:10 +09:00
Bryan Veloso
56d8b80a12 Future-proofing our PIL imports, fixes #37. 2011-10-13 14:35:16 +09:00
Matthew Tretter
8147cb85df ImageSpecFile is a proper File
Previously, ImageSpecFile was a file-like object, but didn't actually
extend any of the file classes. Because of this, some of Django's file-
handling code was duplicated. More importantly, instances didn't always
behave as one might expect (if one were familiar with ImageFields),
particularly when the source image was empty. This could have been
especially confusing in templates. (For example, because
ImageSpecFields whose source images didn't exist were still truthy.)
2011-10-10 17:22:06 -04:00
Matthew Tretter
7f7141ef27 Typo fix 2011-10-10 17:21:59 -04:00
Bryan Veloso
2d4f116e57 Whitespacing and PEP8-ing. 2011-10-11 02:16:22 +09:00
Bryan Veloso
f0269831fd Clearing out some unused imports. 2011-10-11 02:13:31 +09:00
Bryan Veloso
0ddff78068 We no longer import *. 2011-10-11 02:10:38 +09:00
Bryan Veloso
5e72d9f5e4 Prefer cStringIO. 2011-10-11 02:08:05 +09:00
Bryan Veloso
db86d7ed66 Killing off some stray tabs. 2011-10-11 01:12:30 +09:00
Jeff Ammons
2a37d7bfdc Changed id to pk in case the primary key isn't called 'id' 2011-10-06 16:15:26 -07:00
Eric Eldredge
b8e57dccd6 A list of ImageSpec names are now stored on the model.
Previously, ImageSpecFile instances were retrieved (for saving and deleting,
among other possibilities) by iterating over the model instance's attributes.
This change adds ImageSpecFile names to a list (spec_file_names) on an
imagekit meta object on the model (_ik), making later retrieval much cheaper
and more straightforward.
2011-10-06 16:08:14 -04:00
Matthew Tretter
b9aa69e0c0 AdminThumbnailView is now AdminThumbnail
I never liked that the "AdminThumbnailView" was supposed to be defined
on the model, but never looked into it.

This commit puts the definition back where it belongs: in the admin.
Instead of requiring you to add a field (with view logic) to your
model, you now just add a property to your admin class and specify
that property in the `list_display` list.
2011-10-02 21:58:08 -04: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
Chris McKenzie
6412e40c69 adding test for new api 2011-09-26 16:38:55 -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
Matthew Tretter
6751d78504 More docs edits.
Added us to the authors. Reorganized some of the documentation so that
sphinx and the project landing page on github can share it.
2011-09-26 11:36:08 -04:00
Bryan Veloso
cec46b3176 Merge pull request #32 from ryanbagwell/develop
Trasparency preservation patch
2011-09-26 03:06:04 -07:00
Matthew Tretter
6adbef3475 Embracing duck typing.
ImageProcessor didn't do anything. I'd rather get it out of there to reduce the
temptation for future IK contributors to do type checking and mess up peoples'
custom processors.
2011-09-25 23:24:44 -04:00
Matthew Tretter
d6632c95f5 Documentation! 2011-09-25 21:04:11 -04:00
Ryan Bagwell
ff07e4e247 dynamically getting colors, instead of setting it to 255 2011-09-25 17:53:51 -05:00
Ryan Bagwell
b96a3f53a5 adding transparency patch to preserve transparency when saving the image 2011-09-25 15:49:32 -05:00
Matthew Tretter
51144daeb6 Fix bug
Eric's fixes in c00ea10b0a meant that
some of the code that already existed to reuse objects would actually
be run for the first time. Naturally, there were some bugs; namely, I
was storing a filename (instead of a File object) in `_file` and a bad
else clause.
2011-09-25 16:18:52 -04:00
Eric Eldredge
c00ea10b0a Bound fields are now cached on the model instance.
ImageSpecFile and AdminThumbnailView are created on the first access, and
then assigned as properties of the model instance for subsequent access.
2011-09-25 12:42:27 -04:00
Eric Eldredge
f570bd0d7f Transpose processor now supports auto EXIF orientation.
Replaced calls to Image.open with an open_image utility function.
The open_image utility calls Image.open, but then wraps the opened Image's
copy method with a version that preserves EXIF data. This allows an
ImageSpec to copy the original image, yet still provide all the original
image's exif data to the processor pipeline.
2011-09-24 23:09:49 -04:00
Matthew Tretter
c694ba644f Fix filename formatting. 2011-09-24 02:04:23 -04:00
Matthew Tretter
6ae4f56ed7 Eliminate repetition in File objects. 2011-09-24 02:04:23 -04:00
Matthew Tretter
f9c4d6b500 Cleanup.
Centralized access of _img, tried to reduce re-calculation of some
properties, renamed _imgfield to source_file to reflect the fact that
it's an ImageFieldFile and not an ImageField.
2011-09-24 02:04:23 -04:00
Matthew Tretter
cc96ba5198 Moved _get_imgfile() into _create()
That was the only place it was being called and it just led to (my)
confusion with the image property.
2011-09-24 02:04:23 -04:00
Eric Eldredge
8a0bc084fe Processors no longer take a file argument.
They only get the image to process now.
2011-09-23 21:25:47 -04:00
Eric Eldredge
d99bf5327b Transpose processor has a new API.
Transpose now takes transposition constants as arguments. Multiple
transpositions can be sequenced together in one Transpose processor.
Auto transposition is not yet supported (PIL strips the EXIF data, so need to
find a workaround for getting that data to the processor).
2011-09-23 21:23:21 -04:00
Matthew Tretter
7e20b75ced Processors don't care about format.
The process of choosing an image format has been cleaned up and
Processors' role in determining the format has been removed.

Previously, processors would return a tuple containing the modified
image and the format. Other parts of IK overrode PIL's Image.format
with the target format, although that had no effect on PIL and the fact
that it didn't throw an error was just lucky.
2011-09-23 20:18:51 -04:00
Matthew Tretter
15e49be719 Extracted ProcessorPipeline
Pulled some functionality out of _ImageSpecMixin into the ProcessorPipeline
class so it could be used independently of the model-related stuff.
2011-09-23 19:12:04 -04:00
Matthew Tretter
e190e78df5 Rename fields module to models. 2011-09-23 18:06:28 -04:00
Matthew Tretter
3f7ca512af Extension argument to cache_to includes dot.
It seems that's how we do it in python world. Who am I to argue?
2011-09-23 12:44:53 -04:00
Eric Eldredge
77459eae73 Pared down the _post_save_handler.
The original handler implementation ported code from the old ImageModel's
save method, but ended up duplicating the efforts of the ImageSpecFile's
_create method.
2011-09-22 19:44:47 -04:00
Matthew Tretter
3d810e7be5 Rename ImageSpecFile properties
`_obj` and `_spec` are now `instance` and `field`, to match FieldFile.
2011-09-22 18:13:32 -04:00
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
5718c304cf ProcessedImageField replaces preprocessor_spec 2011-09-22 00:24:13 -04:00
Matthew Tretter
98a5ca32b4 Fix bug when imgfield doesn't exist. 2011-09-21 23:10:06 -04:00
Matthew Tretter
a60dfba31d IKOptions no longer exists. 2011-09-21 21:15:16 -04:00
Matthew Tretter
788257b819 property_name is now attname
That's what Django calls it; that's what we'll call it.
2011-09-21 21:15:16 -04:00
Matthew Tretter
fb53981ec8 No need to extend ImageModel.
In fact, ImageModel doesn't exist anymore. Most of IKOptions have also been
removed.
2011-09-21 21:15:09 -04:00
Matthew Tretter
7167016237 Removed specs list from opts. 2011-09-21 20:21:48 -04:00
Matthew Tretter
305d20569c Moved get_bound_specs to utils. 2011-09-21 20:17:23 -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
b5616d2f75 Move ImageSpec to fields module. 2011-09-21 11:37:29 -04:00
Eric Eldredge
fe2fb844af Changed the way post_save and post_delete signals are being handled.
One handler is created per model instead of per bound image spec.
This cuts down on the number of handlers created, and also offloads the
policing of the handlers in memory to the signal framework. Since they are no
longer being created per spec, the handlers can be weakly referenced.
2011-09-21 10:44:05 -04:00
Eric Eldredge
b1c5432310 Implemented post_save and post_delete handlers for ImageSpecs.
Removed the save and clear_cache methods from ImageModel (along with helpers).
Now, whenever an ImageSpec is contributed to a model, handlers are created for
the post_save and post_delete signals. The post_save handler does the work of
running the ImageSpec processors and caching the resulting file, while the
post_delete handler does the work cleaning up the cached files.
2011-09-21 09:56:27 -04:00
Matthew Tretter
34e475885b Unbound fields are accessible from class. 2011-09-21 09:52:38 -04:00
Matthew Tretter
2770be23ea Naming & implementation of bound fields are more consistent.
Bound fields are now named as such (BoundBlah), extend their unbound
counterparts, and their constructors accept an unbound instance.
2011-09-21 09:39:06 -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
80c785f2e5 No need for this. 2011-09-20 21:03:34 -04:00
Matthew Tretter
544d5b874a Added AdminThumbnailView field.
You're no longer restricted to just one, special-case admin thumbnail. Make as
many as you want by adding AdminThumbnailView properties to your model and
including them in your admin class's `list_display` tuple. You can also provide
a custom template. Note that (because this change introduces templates to
imagekit), imagekit is now required in INSTALLED_APPS.

Ideally we could get this stuff out of the model, but we'll have to look into
whether that's possible without making things really complicated.
2011-09-20 19:37:04 -04:00
Matthew Tretter
501d3c7ad3 Now using contribute_to_class.
By creating the Descriptor using contribute_to_class (instead of in
ImageModelBase's __init__), we take the first step towards eliminating the need
to extend ImageModel at all.
2011-09-20 15:44:54 -04:00
Matthew Tretter
82348d4931 Changed how cache files are named.
Removed the cache_dir, cache_filename_fields and cache_filename_format
properties of IKOptions. While these were very powerful, I felt that it was
unnecessarily confusing to have two properties (cache_dir and
cache_filename_format) that determine the filename. The new cache_to property is
modeled after ImageField's upload_to and behaves almost identically (the only
exception being that a callable value receives different arguments). In
addition, I felt that the interpolation of model properties provided by
cache_filename_fields, though useful, would be better handled by a utility
function outside of this library.
2011-09-18 21:08:49 -04:00
Bryan Veloso
df93146049 Making versioning a little easier on myself. 2011-09-12 14:17:12 -07:00
unknown
e295c9c039 error fix: https://github.com/jdriscoll/django-imagekit/issues/25 2011-09-12 17:43:53 +08:00
Matthew Tretter
8cfe485a5a Storage can be specified on a per-spec basis.
If not defined on the spec, IKOptions.default_storage will be used. If that's
not defined, it will fall back to the image field's storage.
2011-09-10 00:25:34 -04:00
Matthew Tretter
57a28091c5 Added default_image_field
This works kind of like Django's models' _default_manager. If your specs don't
specify an image_field, and your IKOptions don't specify a default_image_field,
the first ImageField your model defines will be used.
2011-09-10 00:25:27 -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
5e00de5204 Admin thumbnails. 2011-09-10 00:23:47 -04:00
Bryan Veloso
9af96b4098 Creating a dedicated tests directory.
Moves tests.py out of the main module. Still a work in progress.
2011-09-09 16:33:42 -07:00
Matthew Tretter
a1f11facbe Processors now use static properties. 2011-09-08 16:49:44 -04:00
Matthew Tretter
db4d704f71 Changed ImageSpec constructor so you can use static properties.
For example:

    class MyImageSpec(ImageSpec):
        quality = 100

    class Photo(ImageModel):
        display = MyImageSpec()
2011-09-08 16:48:53 -04:00
Matthew Tretter
def8dea23f Storage moved onto ImageSpec. 2011-09-08 10:28:54 -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
Matthew Tretter
a9895f335a Using spec properties from ImageModel. 2011-09-08 10:00:22 -04:00
Bryan Veloso
7cb59c7351 Think it's time to bump to 0.4.0. 2011-09-07 15:52:14 -07:00
Matthew Tretter
2387cc4be2 Added ability to specify specs in IKOptions directly. 2011-09-02 23:35:58 -04:00
Markus Kaiserswerth
3e3302c7f7 Improve fault tolerance of Accessor._delete()
Handle/ ignored NotImplementedError and IOError which might get thrown
by the storage backend on delete.
2011-08-26 16:42:14 +02:00
BaBaBags
db95e63a63 Added support for preserving transparency when converting from color to greyscale 2011-08-23 10:20:37 -04:00
Bers
aa348d76f6 fix issue #12 2011-07-04 04:09:31 -07:00
Josh Ourisman
5976a512e6 allowing any fields on the object to be specified for use in naming of generated images; default to allowing pk 2011-06-28 14:27:47 -04:00
Josh Ourisman
9845befd96 Added the pk of the object into the dictionary of values passed to the string formatting for cache_filename. 2011-06-28 11:08:05 -07:00
Shanto
6b1aff64c2 Fixes: CMYK files from Photoshop fails to load with exception -2 2011-06-17 13:13:20 -07:00
Bryan Veloso
9637a43551 Bumping the verison numbers. 2011-04-01 11:56:44 -07:00
Bryan Veloso
f777c08b17 Whitespacing. 2011-03-26 00:46:17 -07:00
Jonathan Slenders
57ef4748b9 fixed 'sender' not defined bug (2) 2011-03-26 15:40:22 +08:00
Jonathan Slenders
53cddf7752 fixed 'sender' not defined bug 2011-03-26 15:40:21 +08:00
Bryan Veloso
ad3f15ef76 Instead of overriding Model.delete(), we'll connect a public clear_cache() method to a post_delete() signal so that bulk actions clean props as well. 2011-02-23 12:54:09 -08:00
Bryan Veloso
1b29437180 Bumping the version number. 2011-02-12 14:04:42 -08:00
Bryan Veloso
c566378764 Accessor._delete() and Accessor._exists() needed conditionalizing as well. ikflush was yelling at me. 2011-02-13 05:52:07 +08:00
Bryan Veloso
5d0808467e Bumping internal version to 0.3.4. 2011-02-11 12:52:42 -08:00
Greg Newman
2b80ccf2e3 patch applied badly, fixing if 2011-02-12 04:12:37 +08:00
Greg Newman
34a2640cf5 if the ImageField is null and not required, don't create 2011-02-12 04:06:19 +08:00
Bryan Veloso
5d1c898283 Flush newer records first. Also, spacing. 2011-02-10 19:00:35 -08:00
Bryan Veloso
90dab6c8a1 Don't pre_cache if we don't have an image. 2011-02-10 16:56:31 -08:00
Bryan Veloso
ea35379fd2 Don't create the image if spec.pre_cache is True. 2011-02-10 16:23:36 -08:00
Justin Driscoll
7076e520f7 Fixed type 2010-06-12 15:05:31 -04:00
Justin Driscoll
93a71c4c60 Merged changes 2010-06-12 15:04:43 -04:00
Justin Driscoll
ec83074cee ImageKit should now support optional imagefields better now. 2010-06-12 15:03:59 -04:00
Justin Driscoll
d588be8b8a Bumped version number 2010-04-26 10:40:24 -04:00
Justin Driscoll
4ce59d3e31 Reverted changes to cache path that could possible cause filename collisions 2010-04-22 16:39:51 -04:00
Justin Driscoll
02019f7263 Imagekit not longer uses the appends the upload_to path of the image when generating the cache filename. The new default format is [media_root]/[cache_dir]/[cache_filename]. 2010-01-25 16:19:29 -05:00
Justin Driscoll
125c2c1470 Cleaned up trailing whitespace 2009-12-19 11:01:54 -05:00
Ben Jackson
26f01721df Add IKOption.storage to explicitly set cached thumbnail storage.
Original image storage is still the default, and the original image
is always read from its own storage.
2009-12-17 22:26:19 -08:00
Justin Driscoll
f28683dd0f Fixed indentation error 2009-09-14 14:51:29 -04:00
Justin Driscoll
fa6659162c Added 'replace' argument to save_image 2009-09-02 14:26:30 -04:00
Justin Driscoll
ae14d137de Added tests for save_image method 2009-09-02 14:20:43 -04:00
Justin Driscoll
bc4ff39e9e Added save_image method to ImageModel 2009-09-02 14:20:30 -04:00
Justin Driscoll
77e953edcb Escaped urls in admin_thumbnail 2009-08-31 17:00:38 -04:00
Justin Driscoll
48a2035665 Merged changes 2009-08-11 17:59:03 -04:00
Justin Driscoll
2e0530bb50 Added support for functions in cache_dir 2009-08-11 17:58:22 -04:00
Justin Driscoll
1d82a64bd7 Fixed indent and refactored ikflush command (issue #19) 2009-08-10 14:30:41 -04: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
7a04da81e1 Updated preprocessor implementation 2009-07-19 13:50:31 -04:00
Justin Driscoll
510d4fc1df IOErrors now pass silently when generating spec images 2009-07-09 14:42:49 -04:00
Justin Driscoll
70acfa5a95 Bumped version number 2009-06-04 11:58:33 -04:00
Justin Driscoll
70da53ba4d Added format processor to force a format/extension change 2009-06-04 11:47:16 -04:00
Justin Driscoll
81f4b950cd Restored defaults 2009-06-04 11:06:40 -04:00
Justin Driscoll
47e087e3b4 Fixed handling of palleted images 2009-06-04 11:06:11 -04:00
Justin Driscoll
1a7ec0d947 Bumped version to 0.3.1 for release 2009-05-17 08:46:08 -04:00
Justin Driscoll
62fc447dcc Bumped version in __init__.py 2009-05-17 08:43:06 -04:00
Justin Driscoll
486f602aa2 Merged changes 2009-04-19 13:50:34 -04:00
Justin Driscoll
9c455a19c5 Fixed a couple issues with having an optional (and empty) image field in an ImageModel 2009-04-19 13:46:01 -04:00
Justin Driscoll
cc5c846c0a Fixed check in admin_thumbnail_view 2009-03-13 13:14:53 -04:00
Justin Driscoll
e03edf8e83 admin_thumbnail_view no longer crashes when there is no file found 2009-03-13 12:35:33 -04:00
Justin Driscoll
e0a2ad9ede Added crop choice tuples and tweaked a couple of comments 2009-03-03 11:44:51 -05:00
Justin Driscoll
82bd312baf Renamed config to defaults and modified a couple of default options 2009-02-26 09:59:05 -05:00
Justin Driscoll
54903c7e77 Updated version number and setup requirements 2009-02-04 17:28:30 -05:00
Justin Driscoll
a0cd5c5774 Wrapped opened file in StringIO 2009-02-04 14:38:30 -05:00
Justin Driscoll
45f4c954f0 Added a check to remove any wrappers from the file like object returned in storage.open() 2009-02-04 14:23:52 -05:00
Justin Driscoll
e1e2b52daa Removed dependance on storage.path() which may not be implemented by storage classes 2009-02-04 13:49:20 -05:00
Justin Driscoll
c1777cec90 Fixed tests 2009-02-03 08:50:54 -05:00
Ariel Nunez
920bf47128 Added setup.py and relocated source dir 2009-02-02 15:46:41 -05:00