scikits-image/scikits-image — pull request #307 by kuantkid (2012-09-10 05:30:57+00:00)
Title: FIX issue #263: Inline display for binary image (range problem when converted from bool type)

The conversion between bool matrix and uint8 renders the image to be displayed inline only have gray scale 0 and 1, so the image looks almost uniformly dark.

The bool matrix ```True``` is converted to ```1.0``` for ```float``` and may should be converted to ```255``` for ```np.uint8``` as for consistency. So I multipy the maximum value of the converted type, but this may be a little tricky.

Another thing is converted to ```bool```, I issue a ```prec_loss```, and further a ```sign_loss``` if converted to signed type. Also fix for the tests script in order for consistancy with the code fix.

@ahojnnes Would you please have a look at this? I think this is related to PR #260 and I am not sure about the rule when converting boolean type.(First commit to scikits-image, not sure whether I am doing things right :-) and seems a simple fix includes many commits.)