def resized_url(self, resolution): if resolution == 'autoxauto': return self.storage.url(self.name) else: self.ensure_resolution(resolution) thumb_name = get_thumb_name(self.name, resolution) return self.storage.url(thumb_name)
def get_resize(self, size, filename=None): filename = filename or self.filename filename = '{}/{}'.format(self.test_image_directory, filename) return Image.open(get_thumb_name(filename, size))
def resized(self, resolution): self.ensure_resolution(resolution) return get_thumb_name(self, resolution)