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

16 Bit Deflate tiff Image Corrupt #3832

Closed
faheemziker opened this issue May 7, 2019 · 4 comments · Fixed by #3837
Closed

16 Bit Deflate tiff Image Corrupt #3832

faheemziker opened this issue May 7, 2019 · 4 comments · Fixed by #3837
Labels

Comments

@faheemziker
Copy link

faheemziker commented May 7, 2019

What did you do?

i just opened 16bit deflate tiff files with Pillow Image.open function
and when i saved the file it just save the corrupted image

im=Image.open("deflate_tif_1.tif")
im.save("bad_image_1.jpg")

What did you expect to happen?

it should save the correct/same image

What actually happened?

it is saving corrupted image

What are your OS, Python and Pillow versions?

  • OS: ubuntu

  • Python: 2.7

  • Pillow: 6.0.0

Sample Images

Deflate tiff (input file)
https://www.dropbox.com/s/hlm50c6z99hh9d2/deflate_tif_1.tif?dl=0

Bad Image produces
https://www.dropbox.com/s/csewdhjz2dhitek/bad_image_1.jpg?dl=0

im=Image.open("deflate_tif_1.tif")
im.save("bad_image_1.jpg")
@radarhere radarhere added the TIFF label May 7, 2019
@faheemziker
Copy link
Author

@radarhere
can you help me..?

@kkopachev
Copy link
Contributor

It's probably same as #3770

@faheemziker
Copy link
Author

faheemziker commented May 8, 2019

@kkopachev
I have the latest master with support of old-style JPEG compression
but still having bad image

and its compression is tiff_adobe_deflate

@kkopachev
Copy link
Contributor

@faheemziker you could use Pillow 5.4.1 which does not have this problem.

This issue is a duplicate of #3770.

I opened PR to fix it: #3837

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants