Tried resize my image (weight > 100 MB) using:
>>> from PIL import Image
>>> image = Image.open(path_to_the_file)
>>> new_image = image.resize((200, 200))
and received ValueError: tile cannot extend outside image.
The size of original image is
>>> image.size
>>> (4922, 3707)
The same error I received while doing thumbnails, rotate etc.
What I am doing wrong?
Edit: Checked image using ImageMagic:
$ identify file.tif
file.tif[0] TIFF 4922x3707 4922x3707+0+0 32-bit Grayscale Gray 31.23MB 0.000u 0:00.009
file.tif[1] TIFF 2461x1854 2461x1854+0+0 32-bit Grayscale Gray 31.23MB 0.000u 0:00.000
filetif[2] TIFF 1231x927 1231x927+0+0 32-bit Grayscale Gray 31.23MB 0.000u 0:00.000
file.tif[3] TIFF 616x464 616x464+0+0 32-bit Grayscale Gray 31.23MB 0.000u 0:00.000
file.tif[4] TIFF 308x232 308x232+0+0 32-bit Grayscale Gray 31.23MB 0.000u 0:00.000
file.tif[5] TIFF 154x116 154x116+0+0 32-bit Grayscale Gray 31.23MB 0.000u 0:00.000
identify: Unknown field with tag 33550 (0x830e) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/881.
identify: Unknown field with tag 33922 (0x8482) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/881.
identify: Unknown field with tag 34735 (0x87af) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/881.
identify: Unknown field with tag 34736 (0x87b0) encountered. `TIFFReadDirectory' @ warning/tiff.c/TIFFWarnings/881.
image.thumbnail((200, 200), Image.ANTIALIAS)Image.ANTIALIASdoesn't seem to be a listed re-sampling option forImage.thumbnail(). It's been renamed toImage.LANCZOSsince PIL version 2.7.0