Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Ghislain Antony Vaillant
nithumb
Commits
e2f6174b
Commit
e2f6174b
authored
Apr 20, 2017
by
Jonathan Passerat-Palmbach
Browse files
fix: force conversion to RGB to solve runtime error
parent
836ea750
Changes
1
Hide whitespace changes
Inline
Side-by-side
nithumb.py
View file @
e2f6174b
...
...
@@ -16,4 +16,6 @@ image = load(parsed.inputfile).get_data()
image
=
Image
.
fromarray
(
image
[:,
:,
image
.
shape
[
2
]
//
2
]
if
image
.
ndim
==
3
else
image
)
image
=
image
.
resize
([
128
,
128
])
if
image
.
mode
!=
'RGB'
:
image
=
image
.
convert
(
'RGB'
)
image
.
save
(
parsed
.
thumbnail
)
Write
Preview
Supports
Markdown
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