Commit f211fc73 authored by Nicolas Delaby's avatar Nicolas Delaby

Do not call setConversion in _makeDisplayPhoto method, as it is not a concern of this method

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29019 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 05b47b13
...@@ -397,6 +397,9 @@ class Image(File, OFSImage): ...@@ -397,6 +397,9 @@ class Image(File, OFSImage):
mime, image = self._makeDisplayPhoto(display, format=format, quality=quality, mime, image = self._makeDisplayPhoto(display, format=format, quality=quality,
resolution=resolution, frame=frame, resolution=resolution, frame=frame,
image_size=image_size) image_size=image_size)
self.setConversion(image, mime, format=format, quality=quality,
resolution=resolution, frame=frame,
image_size=image_size)
RESPONSE.setHeader('Content-Type', mime) RESPONSE.setHeader('Content-Type', mime)
return image.index_html(REQUEST, RESPONSE) return image.index_html(REQUEST, RESPONSE)
...@@ -491,10 +494,6 @@ class Image(File, OFSImage): ...@@ -491,10 +494,6 @@ class Image(File, OFSImage):
image = self._getDisplayPhoto(display, format=format, quality=quality, image = self._getDisplayPhoto(display, format=format, quality=quality,
resolution=resolution, frame=frame, resolution=resolution, frame=frame,
image_size=image_size) image_size=image_size)
self.setConversion(image, mime=image.content_type,
display=display, format=format,
quality=quality, resolution=resolution,
frame=frame, image_size=image_size)
return (image.content_type, aq_base(image)) return (image.content_type, aq_base(image))
def _getAspectRatioSize(self, width, height): def _getAspectRatioSize(self, width, height):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment