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
Labels
Merge Requests
142
Merge Requests
142
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
Jobs
Commits
Open sidebar
nexedi
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 (
!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 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
##############################################################################
import
six
import
os
,
sys
,
shutil
,
tempfile
import
io
from
zLOG
import
LOG
,
ERROR
,
INFO
,
WARNING
...
...
@@ -256,8 +257,10 @@ class ZoomifyBase:
# a bug was discovered when a row was exactly 1 pixel in height
# this extra checking accounts for that
if
imageHeight
>
1
:
tempImage
=
imageRow
.
resize
((
imageWidth
/
2
,
imageHeight
/
2
),
PIL_Image
.
ANTIALIAS
)
tempImage
=
imageRow
.
resize
(
(
imageWidth
//
2
,
imageHeight
//
2
),
PIL_Image
.
LANCZOS
if
six
.
PY3
else
PIL_Image
.
ANTIALIAS
,
)
tempImage
.
save
(
os
.
path
.
join
(
tempfile
.
gettempdir
(),
root
+
str
(
tier
)
+
'-'
+
str
(
row
)
+
ext
))
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