Fastest Way To Get Pixel Color In Python Or C++?
I'm trying to add a blur effect to a transparent Tkinter widget I'm making. I made the widget partially transparent with this line (snippet) self.attributes('-alpha', 0.85) In ord
Solution 1:
You may wish to take a look at the Python Image Library you could call something like this
import Image
im = Image.open("name_of_file.jpg")
list_of_pixels = list(im.getdata())
print list_of_pixels[0]
That would output the very first pixel in a RGB format like (255,255,255) It is pretty fast but it wont ever beat C++ I believe
Post a Comment for "Fastest Way To Get Pixel Color In Python Or C++?"