Re: Color picker idea
- From: James Henstridge <james daa com au>
- To: Todd Graham Lewis <tlewis mindspring net>
- cc: Ben Frantzdale <frantzdb admin arhs net>, gnome-list gnome org
- Subject: Re: Color picker idea
- Date: Thu, 1 Apr 1999 13:25:33 +0800 (WST)
Or you could use gdk_imlib. Here is the function you would use:
GdkImlibImage *gdk_imlib_create_image_from_drawable(GdkWindow *gwin,
GdkBitmap * gmask, int x, int y, int width, int height);
You could use this on the root window, setting the x and y coordinates to
the mouse click, and set height, width to 1. Then you can get the RGB
value out of the GdkImlibImage structure.
On Thu, 1 Apr 1999, Todd Graham Lewis wrote:
> On Wed, 31 Mar 1999, Ben Frantzdale wrote:
> > I'd think it'd be nice if there were an option in the Gnome color picker
> > that worked like the eye-dropperin GIMP or PhotoShop. You could cick a
> > "select color from the screen" and then click anywhere to send that
> > pixel's color to the color picker. It'd be usefull if you are trying to
> > have some gnome colors match some non gnome (ie E) colors.
> I was thinking about this tonight. I think that a really easy way to
> do this would be to steal code from xmag; instead of grabbing a 100x100
> window, grab a 1x1 window and take the rgb from it. The xmag code and
> a little elbow grease should be all that you need. If I get a chance,
> then I will look into it, but if someone else wants to do this, then I
> (and others, apparently) would be appreciative.
> Todd Graham Lewis 32°49'N,83°36'W (800) 719-4664, x22804
> ******Linux****** MindSpring Enterprises firstname.lastname@example.org
> "A pint of sweat will save a gallon of blood." -- George S. Patton
> FAQ: Frequently-Asked Questions at http://www.gnome.org/gnomefaq
> To unsubscribe: mail email@example.com with
> "unsubscribe" as the Subject.
] [Thread Prev