Fix how images are converted to PIL

Can now support `float32`, `float64`, `bool` and `uint8` images. `uint8`
images are untouched, the rest are converted and scaled by `255`.

Floating point images outside of the range of `[0, 1]` throw an
exception now.