-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Converting Pillow .tiff image to numpy uint8 produces TypeError on Windows 10 #4447
Labels
Anaconda
Issues with Anaconda's Pillow
Comments
Cannot reproduce: Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from PIL import Image
>>> import numpy as np
>>> img = Image.open('test_tiff.tiff')
>>> image_array = np.array(img, dtype='uint8')
>>> image_array.shape
(1028, 2448, 3)
>>> np.__version__
'1.16.6' |
radarhere
changed the title
Converting Pillow .tiff image to numpy uinit8 produces TypeError on Windows 10
Converting Pillow .tiff image to numpy uint8 produces TypeError on Windows 10
Feb 29, 2020
Could we get a complete traceback for the error? Could you check if your Windows and Ubuntu systems are using different versions of libtiff? That could also be helpful. >>> from PIL import Image
>>> Image.core.libtiff_version
'LIBTIFF, Version 4.1.0\nCopyright (c) 1988-1996 Sam Leffler\nCopyright (c) 1991-1996 Silicon Graphics, Inc.'
>>> |
I'm not able to reproduce this on our GitHub Actions or AppVeyor jobs, so closing due to lack of response. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
What did you do?
Loading a .tiff image:
Convert the loaded image to a NumPy array:
What did you expect to happen?
That I am able to covert the loaded image to a NumPy array.
In OS: Ubuntu 18.04.5 the environment, same version names don't throw an error and it works.
What actually happened?
TypeError:
int() argument must be a string, a bytes-like object or a number, not 'TiffImageFile'
What are your OS, Python and Pillow versions?
Tiff image
test_tiff.zip
The text was updated successfully, but these errors were encountered: