Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can gimp-image-pick-color return Alpha?
#1
It seems that gimp-image-pick-color returns only a 3-tuple even for an RGBA image
Is there a way to provoke it to report all four components?
(or average all four in a radius)

Googling, I find that the GUI color picker will display all the values if you hold SHIFT...
But I need to know if a pixel is transparent from within a script.
Reply
#2
If you need to know for a pixel, use pdb.gimp_drawable_get_pixel(drawable,x,y) that returns 4 values (if there is an alpha channel). Note that this doesn't take in account the layer mask, if any.
Reply
#3
Thanks, that does the needful.
Reply


Forum Jump: