On 11/27/06, Jerry Baker <[EMAIL PROTECTED]> wrote:
Using python, I'm trying to find the color that is used on a layer. The
layer has an alpha channel and it only uses 1 color on the layer. The
problem is, I don't know where the colored pixels are. It may only be
one pixel anywhere on the layer, or the entire layer may be filled.
The only way I know is the slow way:
* initialize a pixel_rgn
* iterate across rows and down columns
* look at each pixel. if its alpha is non-zero (ie. ord(pixval) > 0))
then store the color and exit the loop.
I also need to find the color used on a text layer...
This (and the other text data) is stored in a parasite attached to the text
layer. The parasite data is textual, and easy to understand.
Gimp-user mailing list