Ticket #8307: images.py.diff
File images.py.diff, 801 bytes (added by , 16 years ago) |
---|
-
core/files/images.py
21 21 22 22 def _get_image_dimensions(self): 23 23 if not hasattr(self, '_dimensions_cache'): 24 self._dimensions_cache = get_image_dimensions(self) 24 if self.field.width_field and self.field.height_field: 25 width = getattr(self.instance, self.field.width_field) 26 height = getattr(self.instance, self.field.height_field) 27 self._dimensions_cache = (width, height) 28 else: 29 self._dimensions_cache = get_image_dimensions(self) 25 30 return self._dimensions_cache 26 31 27 32 def get_image_dimensions(file_or_path):