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

Compressed GeoTiff with GDAL no longer plotting with version 6.0.0 #3770

Closed
jomey opened this issue Apr 4, 2019 · 2 comments · Fixed by #3837
Closed

Compressed GeoTiff with GDAL no longer plotting with version 6.0.0 #3770

jomey opened this issue Apr 4, 2019 · 2 comments · Fixed by #3837
Labels
Anaconda Issues with Anaconda's Pillow

Comments

@jomey
Copy link

jomey commented Apr 4, 2019

What did you do?

Plotting an image with matplotlib imshow() broke with version 6.0.0

I have a compressed (LZW) GeoTiff that was produced by GDAL (v 2.4.1, released 2019/03/15). After upgrading from Pillow 5.4.1. to 6.0.0 the background image for a plot was no longer plotting properly.

What are your OS, Python and Pillow versions?

  • OS: Mac OS X and Linux
  • Python: 3.7.3
  • Pillow: 6.0.0

Code to reproduce:

# Python 3.7.3 | packaged by conda-forge | (default, Mar 27 2019, 15:43:19) 
import matplotlib.pyplot as plt
plt.figure()
plt.imshow(plt.imread('/Path/To/sample.tiff'))
plt.show()

With Pillow 5.4.1

pillow-5 4 1

With Pillow 6.0.0

pillow-6

Used image: sample.tif.zip

Compressed with GDAL (2.4.1):

gdal_translate -co COMPRESS=LZW -co TILED=YES -co BIGTIFF=IF_SAFER -co NUM_THREADS=ALL_CPUS -co COPY_SRC_OVERVIEWS=YES
@jomey
Copy link
Author

jomey commented Apr 4, 2019

The image plots properly in version 6.0.0 again when removing the compression via gdal_translate

@radarhere
Copy link
Member

Testing, I find that this relates to #3489

@aclark4life aclark4life added the Anaconda Issues with Anaconda's Pillow label May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Anaconda Issues with Anaconda's Pillow
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants