Skip to content
Permalink
Browse files
Fi #1605
  • Loading branch information
ralsina committed Sep 9, 2015
1 parent b0e9b64 commit 5b43e6bb18bbaf76ead497037b8ee3548424df89
Showing 3 changed files with 8 additions and 4 deletions.
@@ -4,6 +4,7 @@ New in master
Features
--------

* Support SVG in galleries (Issue #1605)
* Allow inheriting templates with theme name (Issue #1814)
* Made TAG_PATH translatable (Issue #1914)
* Made CATEGORY_PATH translatable (Issue #1914)
@@ -52,7 +52,7 @@ class ImageProcessor(object):

def resize_image(self, src, dst, max_size, bigger_panoramas=True):
"""Make a copy of the image in the requested size."""
if not Image:
if not Image or os.path.splitext(src)[1] in ['.svg', '.svgz']:
utils.copy_file(src, dst)
return
im = Image.open(src)
@@ -563,9 +563,12 @@ def url_from_path(p):
for img, thumb, title in zip(img_list, thumbs, img_titles):
w, h = _image_size_cache.get(thumb, (None, None))
if w is None:
im = Image.open(thumb)
w, h = im.size
_image_size_cache[thumb] = w, h
if os.path.splitext(thumb)[1] in ['.svg', '.svgz']:
w, h = 200, 200
else:
im = Image.open(thumb)
w, h = im.size
_image_size_cache[thumb] = w, h
# Thumbs are files in output, we need URLs
photo_array.append({
'url': url_from_path(img),

0 comments on commit 5b43e6b

Please sign in to comment.