Re: Get currently active image in python

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Mar 19, 2012 at 6:39 AM, Jon Decker <jondecker76@xxxxxxxxx> wrote:

> I'm at a part where I need to be able to find out the currently active image
> (the image that is selected in gimp).
> I have tried:
> activeImage = gimp.image_list()[0]

When you call the plugin's main function, you will automatically have
access to the current image and drawable.

So something like this:

def my_plugin_function (image, drawable):
    print image

Will output the image object if gimp was started from a terminal.
This is a bare-bones plugin that adds guides to the current image:
http://registry.gimp.org/files/rule_of_thirds_guides.py

HTH,
CHris
_______________________________________________
gimp-developer-list mailing list
gimp-developer-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gimp-developer-list


[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux