Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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))
Beispiel #4
0
 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))
Beispiel #5
0
 def resized(self, resolution):
     self.ensure_resolution(resolution)
     return get_thumb_name(self, resolution)
Beispiel #6
0
 def resized(self, resolution):
     self.ensure_resolution(resolution)
     return get_thumb_name(self, resolution)