Commit 4c66eae1 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

use LC_NUMERIC=C in imagemagick conversion.

because inkscape DPI handling differs by its value.
parent 56f2ee23
......@@ -30,6 +30,7 @@
#
##############################################################################
import os
import string
import struct
import subprocess
......@@ -342,7 +343,10 @@ class Image(TextConvertableMixin, File, OFSImage):
if self.getContentType() == "image/svg+xml":
data = transformUrlToDataURI(data)
env = os.environ.copy()
env.update({'LC_NUMERIC':'C'})
process = subprocess.Popen(parameter_list,
env=env,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
......
from Products.PortalTransforms.interfaces import ITransform
import os
import subprocess
from zope.interface import implements
......@@ -26,7 +27,10 @@ class ImageMagickTransforms:
if depth:
parameter_list.extend(['-depth', '%s' % depth, '-type', 'Palette'])
parameter_list.append('%s:-' % self.format)
env = os.environ.copy()
env.update({'LC_NUMERIC':'C'})
p = subprocess.Popen(parameter_list,
env=env,
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
......
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