NewPy
2013-06-13 05:22:01 UTC
# read in a grey scale image, imsave convert it to color image
s_file='Nuts.png'
img = mahotas.imread(s_file, as_grey=True)
mahotas.imsave('test.png', img)
exit()
# example 2, instead of getting a black and white image, I got red and blue
strips
import numpy as np
import mahotas
img = np.ones([10,10])
img[::2,:]=0
mahotas.imsave('test.png', img)
Thanks!
s_file='Nuts.png'
img = mahotas.imread(s_file, as_grey=True)
mahotas.imsave('test.png', img)
exit()
# example 2, instead of getting a black and white image, I got red and blue
strips
import numpy as np
import mahotas
img = np.ones([10,10])
img[::2,:]=0
mahotas.imsave('test.png', img)
Thanks!
--
You received this message because you are subscribed to the Google Groups "pythonvision" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonvision+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.
You received this message because you are subscribed to the Google Groups "pythonvision" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pythonvision+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit https://groups.google.com/groups/opt_out.