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

massiv-io: readImage(Auto) ConvertError on reading tif or png image #85

Closed
rl-king opened this issue Nov 14, 2019 · 3 comments
Closed

Comments

@rl-king
Copy link

rl-king commented Nov 14, 2019

Similar to #22. I'm trying to read a tif or png file and get a conversion error. I've attached two sample images I just created in Photoshop.

I originally tried to read a grayscale image which didn't work either. I ended up trying a bunch of formats and color spaces and using readImage doesn't make a difference.

Using stack resolver: lts-14.14

:> readImageAuto "test.png" :: IO (Image S RGB Word16)
Array S *** Exception: ConvertError "Cannot decode Auto PNG image <Image S RGB Word16> as <Image S RGB Word16>"
:> readImageAuto "test.tiff" :: IO (Image S RGB Word16)
Array S *** Exception: ConvertError "Cannot decode Auto TIF image <Image S RGB Word16> as <Image S RGB Word16>"

test-tif-and-png.zip

@lehins lehins closed this as completed in 82e0de0 Nov 14, 2019
@lehins
Copy link
Owner

lehins commented Nov 14, 2019

I wish JuicyPixels just used Storable instances like everyone else, but no, there is a custom mechanism for dealing with multiple channels. In any case, that was my fault, thank you for spotting the mistake, it should be fixed now. I'll make a release a little bit later today, so new version will be in the next LTS.

@lehins
Copy link
Owner

lehins commented Nov 14, 2019

Oh, and the error message was pretty stupid. That part will get much better in the next major release of massiv-io, which will happen hopefully not too far into the future.

@rl-king
Copy link
Author

rl-king commented Nov 14, 2019

Thanks for the quick response and fix!

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

No branches or pull requests

2 participants