I want to achieve the gradient mapping effect available in Photoshop. There is already a message explaining the desired result. Also this answer covers exactly what I want to do, however
im = Image.fromarray(np.uint8(cm.gist_earth(myarray)*255))
doesn't work for me, since I don't know how to normalize an array to 1.0 values.
Below is my code as I intend to work.
im = Image.open(filename).convert('L')
im_arr = numpy.asarray(im)
im = Image.fromarray(im_arr)
Can someone point out possible options and an ideal way to apply a color map to this array? I do not want to conceive this, because there seems to be no easy way to convert the shape of a gun into an image.
You can also specify how to normalize the array, since I cannot do this and cannot find help anywhere.