Changes between Initial Version and Version 1 of Ticket #24441, comment 3


Ignore:
Timestamp:
Mar 3, 2015, 3:42:41 AM (10 years ago)
Author:
artscoop

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #24441, comment 3

    initial v1  
    99- Exported the old production site to a local dev version (with a fixed ImageField). Past bogus files are still there and break loudly as soon as Django finds the image field.
    1010
    11 I don't even blame Pillow. I really think `get_image_dimensions` is bogus because it should never return `None`. Instead it should return a tuple with empty dimensions or error dimensions `(0, 0) or (1, 1)` because the calling function simply chokes when receiving a `None` (instead of dealing with `None` it *always* assumes it's a tuple, and *this* is a bug, either in the calling function or the called one)
     11I don't even blame Pillow. I really think `get_image_dimensions` is bogus because it should never return `None`. Instead it should return a tuple with empty dimensions or error dimensions `(0, 0) or (-1, -1)` because the calling function simply chokes when receiving a `None` (instead of dealing with `None` it *always* assumes it's a tuple, and *this* is a bug, either in the calling function or the called one)
     12
     13Forgot something obvious: the bug occurs only if the `ImageField` has a `width_field` and `height_field`.
Back to Top