Commit 56084787 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki Committed by Cédric Le Ninivin

Doducment/Image: use sRGB color profile explicitly in converted images.

otherwise Firefox (with default configuration) may display strange colors, especially if the original uses ICC v4 profile.
parent 1b64b93d
......@@ -323,7 +323,10 @@ class Image(TextConvertableMixin, File, OFSImage):
def _resize(self, quality, width, height, format, resolution, frame, crop=False):
"""Resize and resample photo."""
parameter_list = ['convert', '-colorspace', 'sRGB', '-depth', '8']
icc_profile = os.path.join(os.path.dirname(__file__),
'..', 'misc', 'sRGB.icc')
parameter_list = ['convert', '-colorspace', 'sRGB', '-depth', '8',
'-profile', icc_profile]
if crop :
parameter_list += '-thumbnail', '%sx%s^' % (width, height),\
'-gravity', 'center',\
......
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