Skip to content
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

Cannot read TIFF file #3536

Closed
gabdube opened this issue Jan 3, 2019 · 4 comments
Closed

Cannot read TIFF file #3536

gabdube opened this issue Jan 3, 2019 · 4 comments
Labels

Comments

@gabdube
Copy link

gabdube commented Jan 3, 2019

What did you do?

Generated cubemaps in a .TIFF format
Tried to read the output with Pillow

What did you expect to happen?

I expected to be able to read the file.

What actually happened?

Got a ValueError: seek of closed file. See my code sample just below.

What are your OS, Python and Pillow versions?

  • OS: Linux / Ubuntu 18.04.1 LTS
  • Python: 3.7.1
  • Pillow: 5.4.0

Other notes

>>> from PIL import Image
>>> Image.open('irr_cubemap.tiff')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/gab/.pyenv/versions/3.7.1/lib/python3.7/site-packages/PIL/Image.py", line 2672, in open
    im = _open_core(fp, filename, prefix)
  File "/home/gab/.pyenv/versions/3.7.1/lib/python3.7/site-packages/PIL/Image.py", line 2657, in _open_core
    fp.seek(0)
ValueError: seek of closed file

Files:
tmp.zip

@cgohlke
Copy link
Contributor

cgohlke commented Jan 4, 2019

I don't think PIL can handle float32 RGB images.

Besides that, it seems the TiffImagePlugin closes file handles that it does not own.

@radarhere
Copy link
Member

The ValueError: seek of closed file error has now been fixed in #3540.

@radarhere
Copy link
Member

Are you happy for the rest of this to be considered part of #1888, and for this issue to be closed?

@gabdube
Copy link
Author

gabdube commented Jan 6, 2019

@radarhere No problem.

@hugovk hugovk closed this as completed Jan 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants