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
16-bit TIFF files truncated to 0..255 before conversion to float #274
It appears (from Convert.c) that there's no direct conversion from I;16 to F. There are I to F, and I;16 to I, but nothing that works in one step. [edit, though, I'm not actually seeing how it should work at all, since it should return a conversion not supported error. edit 2, this https://github.com/python-imaging/Pillow/blob/master/PIL/Image.py#L703 is the truncation. ]
Activity
wiredfool commentedon Jul 9, 2013
It appears (from Convert.c) that there's no direct conversion from I;16 to F. There are I to F, and I;16 to I, but nothing that works in one step. [edit, though, I'm not actually seeing how it should work at all, since it should return a conversion not supported error. edit 2, this https://github.com/python-imaging/Pillow/blob/master/PIL/Image.py#L703 is the truncation. ]
It looks like a conversion for the I;16 modes -> F should be straight forward.
bailey-989 commentedon Jul 15, 2013
In case anyone is as retarded as me, and completely didn't twig from the above answer, just use
im.convert('I').convert('F').
This is what Wiredfool suggested, so credit to him.
Merge pull request python-pillow#274 from nulano/fribidi