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
'ValueError: unknown raw mode' when converting large TIF file #3828
Comments
Any news on this? Is there any way to help? |
Apologies for not getting this the first time. I've created PR #3913 to help. If that is merged, you will be able to do - from PIL import Image
image = Image.open('alp-1978-big-tif.tif')
image.thumbnail((800, 800))
image.copy().save('out.tif') You will not be able to run that code without the |
@anpr Please can you check if the PR helps? |
The PR has now been merged, so you can check master. |
Pillow 6.1.0 has now been released, so the improvement is now a part of that. |
Sorry for the delay, we only could test it now. We did test it now, using the 6.1.0 release, and indeed everything works as expected! Thanks a lot :-) |
I'm having this same issue, even if using
import os
import sys
from PIL import Image
directory = sys.argv[1]
for filename in os.listdir(directory):
if filename.endswith(".dds"):
filename = os.path.join(directory, filename)
print(filename)
with Image.open(filename) as img:
img.copy().save(filename[0:len(filename)-4]+".png") I'm iterating over a directory of dds files and converting them to png. The first 20 or so work fine, but I consistently get this error at a specific file. Any ideas why or how to fix it? |
What did you do?
I tried to open this large TIF file with Pillow 6.1.0 (sha 0e36b28) in the following way:
What did you expect to happen?
No exception. I can later save the image with
image.save(output_path)
What actually happened?
The following exception occurred:
ValueError: unknown raw mode
What are your OS, Python and Pillow versions?
This is a follow-up issue of #3815
The text was updated successfully, but these errors were encountered: