mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-29 10:45:16 +08:00
Return correct type for as_grey with freeimage
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user