summaryrefslogtreecommitdiff
path: root/django/core/files/images.py
AgeCommit message (Collapse)Author
2025-07-23Removed double spaces after periods and within phrases.Sarah Boyce
2024-01-26Applied Black's 2024 stable style.Mariusz Felisiak
https://github.com/psf/black/releases/tag/24.1.0
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2021-09-02Fixed #33079 -- Fixed get_image_dimensions() on nonexistent images.Stefanos I. Tsaklidis
Thanks Nick Pope for the review.
2018-08-23Fixed #29705 -- Fixed ImageField RuntimeError crash for WebP files.winkidney
2017-02-21Refs #27656 -- Updated django.core docstring verbs according to PEP 257.Anton Samarchyan
2016-08-25Replaced property() usage with decorator in several places.Berker Peksag
2015-04-08Removed unused exception "as" variable.Tim Graham
2015-04-07Fixed #24544 -- Fixed get_image_dimensions() on image buffers that Pillow ↵steve
fails to parse. Thanks Steve Kossouho for the report and original patch.
2015-03-25Fixed #24441 -- Changed get_image_dimensions() return value for broken imagesRaúl Cumplido
2014-03-21Removed PIL compatability layer per deprecation timeline.Tim Graham
refs #19934.
2013-11-03Fixed all E226 violationsAlex Gaynor
2013-05-14Fixed #19934 - Use of Pillow is now preferred over PIL.Daniel Lindsley
This starts the deprecation period for PIL (support to end in 1.8).
2013-01-01Replaced six.reraise with a simple raise.Florian Apolloner
2013-01-01Replaced e.message with e.args[0] in 3aa4b8165da23a2f094d0eeffacbda5484f4c1f6.Florian Apolloner
2013-01-01Fixed #19457 -- ImageField size detection failed for some files.Anton Baklanov
This was caused by PIL raising a zlib truncated stream error since we fed the parser with chunks instead of the whole image.
2012-07-30Fixed a security issue in image uploading. Disclosure and release forthcoming.Florian Apolloner
2010-09-10Fixed #11158 - get_image_dimensions very slow/incorrect after 1 callLuke Plant
Thanks to kua for the report, and to kua, SmileyChris and SAn for the patch git-svn-id: http://code.djangoproject.com/svn/django/trunk@13715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-02-14Fixed #6054: work around PIL's installation brokeness by detecting either of ↵Jacob Kaplan-Moss
the two ways it can end up being installed. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12429 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-11Fixed #10404: ImageField height_field and width_field options no longer ↵Jacob Kaplan-Moss
depend on putting the image field after the height/width fields as they did after r9766. This bug actually exposed a related handful of inconsistancies in the underlying file handling and wraping, so a few related changes are in here as well: * Dimensions are also now calculated the moment the image is assigned to the field instead of upon save. * The base `File` object now when possible delegates its closed attribute down to the os-level file it wrapps. * In-memory files' `close()` now is a no-op. Without this certain APIs that should be able to handle in-memory files were failing. * Accessing `FieldFile.closed` used to open the file. That's silly, and it doesn't any more. * Some over-eager error handling was squishing some errors that would normally be raised. One unit test was incorrectly depending on this behavior, so the test was removed. Thanks to Armin Ronacher for much of this work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2009-05-08Fixed #8817: get_image_dimensions correctly closes the files it opens, and ↵Jacob Kaplan-Moss
leaves open the ones it doesn't. Thanks, mitsuhiko. While I was at it, I converted the file_storage doctests to unit tests. git-svn-id: http://code.djangoproject.com/svn/django/trunk@10707 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08Don't import PIL until needed so that systems without PIL don't barf.Jacob Kaplan-Moss
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2008-08-08File storage refactoring, adding far more flexibility to Django's file ↵Jacob Kaplan-Moss
handling. The new files.txt document has details of the new features. This is a backwards-incompatible change; consult BackwardsIncompatibleChanges for details. Fixes #3567, #3621, #4345, #5361, #5655, #7415. Many thanks to Marty Alchin who did the vast majority of this work. git-svn-id: http://code.djangoproject.com/svn/django/trunk@8244 bcc190cf-cafb-0310-a4f2-bffc1f526a37