You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
matplotlib.pyplot.imread silently fails on uint16 images. #3616
@tacaswell that's not really the right issue. The issue is colormapping a grayscale image at save time instead of either saving it as-is or raising an error. It's the colormapping that's the problem, not jet. (Jet is the icing on the cake.) Should I raise a new issue?
Activity
WeatherGod commentedon Oct 4, 2014
Could you double-check with matplotlib 1.4.0? I think this might have already been fixed.
jni commentedon Oct 4, 2014
@WeatherGod No such luck:
jni commentedon Oct 4, 2014
BLEURG! I had a horrible thought and it seems to have panned out: the
imsavehad already messed up the image!I'll investigate further...
jni commentedon Oct 4, 2014
Looks like there is a lot of IO voodoo going on everywhere:
That save/read roundtrip outcome seems highly undesirable!
jni commentedon Oct 4, 2014
That's hilarious, looking at the actual image I just realised what happened: mpl silently remapped the uint16 values to Jet and then saved that!
WeatherGod commentedon Oct 4, 2014
Jet strikes again!
"With my last breath, I curse Jet!"
On Fri, Oct 3, 2014 at 10:31 PM, Juan Nunez-Iglesias <
notifications@github.com> wrote:
cgohlke commentedon Oct 4, 2014
The uint16 array is not a valid input for
skimage.io.imsavewhen using the PIL plugin. See https://github.com/scikit-image/scikit-image/blob/master/skimage/io/_plugins/pil_plugin.py#L144jni commentedon Oct 5, 2014
@cgohlke that should change soon, but thanks for the pointer! =)
@WeatherGod 👍
mdboom commentedon Oct 5, 2014
So, if I'm reading the above correctly, this is not an issue with matplotlib's imread, but skimage.io.imsave? Should we close this then?
jni commentedon Oct 5, 2014
@mdboom well, that "saving as jet" thing is bugging me to no end, but perhaps that belongs in a separate issue?
tacaswell commentedon Oct 17, 2014
@jni Yes, jet-related griping should go in #875.
jni commentedon Oct 17, 2014
@tacaswell that's not really the right issue. The issue is colormapping a grayscale image at save time instead of either saving it as-is or raising an error. It's the colormapping that's the problem, not jet. (Jet is the icing on the cake.) Should I raise a new issue?
tacaswell commentedon Oct 17, 2014
In that case, yes.