[Gimp-developer] easier way to convert image into selection

David Gowers 00ai99 at gmail.com
Sun Sep 17 16:03:12 PDT 2006


On 9/17/06, Sven Neumann <sven at gimp.org> wrote:
>
> Hi,
>
> On Fri, 2006-09-15 at 09:39 +0930, David Gowers wrote:
>
> > It's much easier to code 'image to selection':
> >
> >         c = pdb.gimp_channel_new_from_component(image, GRAY_CHANNEL,
> > 'TEMP IMAGE2SELECTION')
>
> This works for grayscale images only. An RGB image doesn't have a
> grayscale component. For grayscale images there is also no point in
> writing such a script because you can already choose "Channel to
> Selection" from the channel's right-click menu.


I tested it for RGB images and it appears to work correctly.
Perhaps it just uses the 1st channel (R) though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /lists/gimp-developer/attachments/20060917/ae14ad1e/attachment.html


More information about the Gimp-developer mailing list