Return correct type for as_grey with freeimage

This commit is contained in:
Neil
2011-07-16 21:53:30 +02:00
parent 26402a7e67
commit 8ceb250bee
@@ -514,7 +514,7 @@ def imread(filename, as_grey=False):
if as_grey and len(img) == 3:
# these are the values that wikipedia says are typical
transform = numpy.array([ 0.30, 0.59, 0.11])
return numpy.dot(img, transform)
return numpy.dot(img, transform).astype('uint8')
return img
def imsave(filename, img):