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

TIFF.read_image() fails to read RGB images #25

Closed
GoogleCodeExporter opened this issue Apr 3, 2015 · 1 comment
Closed

TIFF.read_image() fails to read RGB images #25

GoogleCodeExporter opened this issue Apr 3, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

TIFF.read_image() only works with grey-scale images. When attempting to read a 
RGB image, it only returns the R channel (in separate plane config) or the  
first third of the data (in contiguous plane config).

The SamplesPerPixel field must be taken into account, and if it's more than 1, 
the returned array must be a 3D array.

This is what the attached patch does. It handles both contiguous and separate 
plane configs. 

The patch is also available as a git commit here:
https://github.com/delmic/pylibtiff/commit/94eabe3b063d1d245d46c67adbe91604b944b
a0e

Original issue reported on code.google.com by eric.p...@gmail.com on 5 Aug 2013 at 2:17

Attachments:

@GoogleCodeExporter
Copy link
Author

Thanks! Patch is applied to svn.

Original comment by pearu.peterson on 13 Sep 2014 at 10:17

  • Changed state: Fixed

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

No branches or pull requests

1 participant