RSS/Atom feed Twitter
Site is read-only, email is disabled

(gimp-drawable-get-pixel)

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

2 of 2 messages available
Toggle history

Please log in to manage your subscriptions.

(gimp-drawable-get-pixel) Zoran Bosnjak 13 Jul 18:02
  (gimp-drawable-get-pixel) Simon Budig 13 Jul 15:17
Simon Budig
2002-07-13 15:17:39 UTC (almost 22 years ago)

(gimp-drawable-get-pixel)

Zoran Bosnjak (zoran.bosnjak@email.si) wrote:

Hello,
can someone please explain me how to use the result from (gimp-drawable-get-pixel) inside the scheme script?

The function gives me result like (4 #4"1d1d1dff"). How do I convert this result to more friendly form like '(255 127 0), so I could make some calculations with it?

The result is a list: Array-length and the array. You can access the elements of the array via (aref array index)

But keep in mind, that processing all pixels of an image with (gimp-drawable-get-pixel) is *slow*. You might want to use gimp-perl or write an plugin in C.

Bye, Simon

Zoran Bosnjak
2002-07-13 18:02:43 UTC (almost 22 years ago)

(gimp-drawable-get-pixel)

Hello,
can someone please explain me how to use the result from (gimp-drawable-get-pixel) inside the scheme script?

The function gives me result like (4 #4"1d1d1dff"). How do I convert this result to more friendly form like '(255 127 0), so I could make some calculations with it?

The second question is: What is the best way to calculate how one pixel match the other pixel by the color (result between 0-no match at all and 1-same color)? A simple scheme example would be great.

Thank you for your answer.

best regards, Zoran Bosnjak