freeman-lab/thunder — pull request #59 by industrial-sloth (2014-12-01 21:16:11+00:00)
Title: 0.4.x: fix floating point tif loading

Gets rid of the `pil_to_array` function in thunder/utils/common.py - recent versions of PIL (at least >= 1.1.6, if not earlier) support the numpy array interface, allowing numpy arrays to be created directly from a PIL image by just an `array()` call.

This fixes #58, which was caused by an incomplete set of possible image modes in our version of `pil_to_array`. A 32 bit floating point version of the "dotdotdot" test tif file is added to the unit test resources in order to assert that loading floating point tifs is working as it should be.

I've tested this locally and on ec2, with ec2 clusters launched with both the 0.4.x thunder-ec2 script and the 0.5.x version, which now installs a newer version of PIL / pillow. This does still work with PIL 1.1.6, as is installed by default on ec2 by the 0.4.x scripts.