Commit graph

408 commits

Author SHA1 Message Date
Timothée Peignier
9700a10d4b fix documentation build. close #56 2012-03-10 12:02:32 +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
24a2d772a6 Organized tests 2012-02-18 01:56:17 -05:00
Matthew Tretter
8fc71e689a Cover renamed to ResizeToCover 2012-02-18 01:38:19 -05:00
Matthew Tretter
2431aa2d2e Contributing note 2012-02-18 00:48:08 -05:00
Matthew Tretter
3b4e74c58b Add @version2 to contributors 2012-02-18 00:35:34 -05:00
Matthew Tretter
00c1cd3f9e Merge branch 'processor_updates' into develop 2012-02-18 00:20:59 -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
35b04aeb16 Abstract inheritance test; illustrates #100 2012-02-17 21:10:05 -05:00
Matthew Tretter
310fd86c21 Extract utility functions 2012-02-17 20:44:47 -05:00
Matthew Tretter
84d36791b8 Pass the pickle test; should fix #97 2012-02-17 20:07:50 -05:00
Matthew Tretter
280d01f07e Failing test to illustrate #97 2012-02-17 19:22:49 -05:00
Matthew Tretter
1bd3035f2c Extract image/model generation utils 2012-02-17 18:53:04 -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
Matthew Tretter
60c78e7424 Clarifying documentation 2012-02-17 16:08:58 -05:00
Bryan Veloso
854716aea6 Merge pull request #104 from toidi/patch-1
fix unicode error
2012-02-16 12:37:26 -08: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
Matthew Tretter
082cf6a1bb Merge pull request #99 from cyberdelia/pep8-import-fixes
Fix import and formatting
2012-02-14 08:44:50 -08:00
Timothée Peignier
98066eea93 fix import and formatting 2012-02-14 17:34:51 +01: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
88cc692568 Merge branch 'refactor_generation' into develop 2012-02-12 17:27:07 -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