Gimp Python plugin gimp.Image as numpy array
问题 I'm working on a python plugin for GIMP and I would like to obtain the RGB matrix of a layer as a numpy array. To access the layer in the python plugin I use the next code: def python_function(img, layer): layer = img.layers[0] I would like to make layer variable, instead of a gimp.Image variable, a numpy array containing, for each pixel, its RGB values. What I use in other nonGimp-python code is this next line: frame2 = misc.imread('C:\Users\User\Desktop\image2.png').astype(np.float32) . If