scikits-image/scikits-image — pull request #99 by cgohlke (2011-12-11 20:14:11+00:00)
Title: Rewrite dtype._convert function

This is a suggested patch for issue #92.

On my win-amd64-py2.7 system:

* conversion of a 512 MB uint16 image to uint8 now takes 0.56 s instead of 6 s
* conversion of a 2 GB float64 image to uint8 now takes 1.4 s instead of 6.1 s

All skimage tests pass.

The conversion function also supports float16, int32, and uint32 types in case this is needed in the future.