Ballon
Ballon

Reputation: 7204

How to meter pixel on screen

I need to meter pixel on web page or on the screen. I used orange pixel meter is any other program similar to mater pixel on screen.

Upvotes: 1

Views: 5794

Answers (2)

david4dev
david4dev

Reputation: 4914

I can't really tell what you mean but if you want to get the RGB value of a pixel at a particular coordinate, you can use this python script:

#!/usr/bin/python -W ignore::DeprecationWarning
import sys
import gtk

def get_pixel_rgb(x, y):
    pixbuf = gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, False, 8, 1, 1)
    pixbuf.get_from_drawable(gtk.gdk.get_default_root_window(),
                             gtk.gdk.colormap_get_system(), 
                             x, y, 0, 0, 1, 1)
    return pixbuf.get_pixels_array()[0][0]

print get_pixel_rgb(int(sys.argv[1]), int(sys.argv[2]))

via @htorque

Upvotes: 0

mingos
mingos

Reputation: 24542

Check this addon for Firefox/Chrome/Safari: http://www.kevinfreitas.net/extensions/measureit/

Upvotes: 0

Related Questions