-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
imread() for tiff file returns wrong dimensions #5545
Comments
Thanks for reporting this! I can reproduce this issue with a tiff file bundled with the repository as well: from pathlib import Path
io.imread(Path('skimage/data/multipage.tif')).shape
# (15, 10)
io.imread(str(Path('skimage/data/multipage.tif'))).shape
# (2, 15, 10) |
See #5546 for an explanation of why this was happening (basically a check for the file extension did not work properly when the input was a Path) |
Thanks, that's awesome! |
Is this issue still open for a fix? |
@oreo2107, this one has a fix already proposed in #5546 |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/magic-gui-not-reading-image-stack/63284/2 |
Consider this following code:
Output:
I am trying to read a tiff file with 6 color channels. Why do I get different image dimension depending on whether I pass a PosixPath or a string to
imread()
? If PosixPaths are not supported byimread()
, which is totally fine, could you please throw a ValueError?The text was updated successfully, but these errors were encountered: