Re: [Gimp-developer] Get currently active image in python
- From: Chris Mohler <cr33dog gmail com>
- To: Jon Decker <jondecker76 gmail com>
- Cc: gimp-developer-list gnome org
- Subject: Re: [Gimp-developer] Get currently active image in python
- Date: Tue, 20 Mar 2012 11:03:21 -0500
On Mon, Mar 19, 2012 at 6:39 AM, Jon Decker <jondecker76 gmail com> 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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]