Commit 0e500238 authored by Nicolas Delaby's avatar Nicolas Delaby

Do not pass unnecessary parameters to image.convert

This allows ImageField to return original image content
parent 9f8c7c28
...@@ -133,8 +133,12 @@ class ImageFieldWidget(Widget.TextWidget): ...@@ -133,8 +133,12 @@ class ImageFieldWidget(Widget.TextWidget):
image_object = field.getPortalObject().restrictedTraverse(path) image_object = field.getPortalObject().restrictedTraverse(path)
display = field.get_value('image_display') display = field.get_value('image_display')
format = field.get_value('image_format') format = field.get_value('image_format')
image_parameter_dict = { 'display': display, resolution = field.get_value('image_resolution')
'format':format} image_parameter_dict = {'format': format}
if display:
image_parameter_dict['display'] = display
if resolution:
image_parameter_dict['resolution'] = resolution
# convert the image using fields parameters. In this way, if an image # convert the image using fields parameters. In this way, if an image
# is displayed in the form as a thumbnail, it will be added in the odg # is displayed in the form as a thumbnail, it will be added in the odg
# document as thumbnail size/quality # document as thumbnail size/quality
......
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