Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
erp5
Commits
4c66eae1
Commit
4c66eae1
authored
Aug 18, 2015
by
Kazuhiko Shiozaki
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use LC_NUMERIC=C in imagemagick conversion.
because inkscape DPI handling differs by its value.
parent
56f2ee23
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
product/ERP5/Document/Image.py
product/ERP5/Document/Image.py
+4
-0
product/PortalTransforms/libtransforms/imagemagick_transform.py
...t/PortalTransforms/libtransforms/imagemagick_transform.py
+4
-0
No files found.
product/ERP5/Document/Image.py
View file @
4c66eae1
...
@@ -30,6 +30,7 @@
...
@@ -30,6 +30,7 @@
#
#
##############################################################################
##############################################################################
import
os
import
string
import
string
import
struct
import
struct
import
subprocess
import
subprocess
...
@@ -342,7 +343,10 @@ class Image(TextConvertableMixin, File, OFSImage):
...
@@ -342,7 +343,10 @@ class Image(TextConvertableMixin, File, OFSImage):
if
self
.
getContentType
()
==
"image/svg+xml"
:
if
self
.
getContentType
()
==
"image/svg+xml"
:
data
=
transformUrlToDataURI
(
data
)
data
=
transformUrlToDataURI
(
data
)
env
=
os
.
environ
.
copy
()
env
.
update
({
'LC_NUMERIC'
:
'C'
})
process
=
subprocess
.
Popen
(
parameter_list
,
process
=
subprocess
.
Popen
(
parameter_list
,
env
=
env
,
stdin
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
...
...
product/PortalTransforms/libtransforms/imagemagick_transform.py
View file @
4c66eae1
from
Products.PortalTransforms.interfaces
import
ITransform
from
Products.PortalTransforms.interfaces
import
ITransform
import
os
import
subprocess
import
subprocess
from
zope.interface
import
implements
from
zope.interface
import
implements
...
@@ -26,7 +27,10 @@ class ImageMagickTransforms:
...
@@ -26,7 +27,10 @@ class ImageMagickTransforms:
if
depth
:
if
depth
:
parameter_list
.
extend
([
'-depth'
,
'%s'
%
depth
,
'-type'
,
'Palette'
])
parameter_list
.
extend
([
'-depth'
,
'%s'
%
depth
,
'-type'
,
'Palette'
])
parameter_list
.
append
(
'%s:-'
%
self
.
format
)
parameter_list
.
append
(
'%s:-'
%
self
.
format
)
env
=
os
.
environ
.
copy
()
env
.
update
({
'LC_NUMERIC'
:
'C'
})
p
=
subprocess
.
Popen
(
parameter_list
,
p
=
subprocess
.
Popen
(
parameter_list
,
env
=
env
,
stdin
=
subprocess
.
PIPE
,
stdin
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment