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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Xiaowu Zhang
erp5
Commits
4c323863
Commit
4c323863
authored
Oct 24, 2024
by
Jérome Perrin
Committed by
Arnaud Fontaine
Oct 24, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! py2/py3: Make Products code compatible with both python2 and python3 (
nexedi/erp5!1751
).
parent
afd17ece
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bt5/erp5_safeimage/ExtensionTemplateItem/portal_components/extension.erp5.ERP5ZoomifyImage.py
...Item/portal_components/extension.erp5.ERP5ZoomifyImage.py
+5
-2
No files found.
bt5/erp5_safeimage/ExtensionTemplateItem/portal_components/extension.erp5.ERP5ZoomifyImage.py
View file @
4c323863
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
##############################################################################
import
six
import
os
,
sys
,
shutil
,
tempfile
import
os
,
sys
,
shutil
,
tempfile
import
io
import
io
from
zLOG
import
LOG
,
ERROR
,
INFO
,
WARNING
from
zLOG
import
LOG
,
ERROR
,
INFO
,
WARNING
...
@@ -256,8 +257,10 @@ class ZoomifyBase:
...
@@ -256,8 +257,10 @@ class ZoomifyBase:
# a bug was discovered when a row was exactly 1 pixel in height
# a bug was discovered when a row was exactly 1 pixel in height
# this extra checking accounts for that
# this extra checking accounts for that
if
imageHeight
>
1
:
if
imageHeight
>
1
:
tempImage
=
imageRow
.
resize
((
imageWidth
/
2
,
imageHeight
/
2
),
tempImage
=
imageRow
.
resize
(
PIL_Image
.
ANTIALIAS
)
(
imageWidth
//
2
,
imageHeight
//
2
),
PIL_Image
.
LANCZOS
if
six
.
PY3
else
PIL_Image
.
ANTIALIAS
,
)
tempImage
.
save
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
root
+
str
(
tier
)
tempImage
.
save
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
root
+
str
(
tier
)
+
'-'
+
str
(
row
)
+
ext
))
+
'-'
+
str
(
row
)
+
ext
))
tempImage
=
None
tempImage
=
None
...
...
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