I am trying to read the RGB values at certain locations on my
map which is a .tif
-file I brought into QGIS.
Goal: match species presence points on my map to certain RGB values on the .tif
-file.
from PIL import Image
img = PIL.Image.open(iface.layerTreeView().selectedLayers())
col = img.convert("RGB")
val = col.getpixel((0,0)) #tried to read value at center
print (val)
And getting the error:
AttributeError: 'list' object has no attribute 'read'