RSS/Atom feed Twitter
Site is read-only, email is disabled

How to keep a reference to an image in PyGimp?

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

1 of 1 message available
Toggle history

Please log in to manage your subscriptions.

How to keep a reference to an image in PyGimp? David Gowers 25 Aug 16:14
David Gowers
2006-08-25 16:14:22 UTC (over 17 years ago)

How to keep a reference to an image in PyGimp?

I have an image. And I want to have two 'views' of the image -- not in the sense that gimp uses the word 'view', but I want an RGB version and Indexed version. I wrote a plugin to do this; if it detects a first time run (ie. no alternate views exist), it duplicates the image, converts it to GRAY mode, and stores references to the alternate views on each image. Then it tries to reconnect the displays belonging to the image to the alternate image. This succeeds, but the original image is destroyed. Is there some way that I can work around this, so that both images can be around? I understand it occurs because there is no longer a reference to the image. Is there a way to keep a reference despite the expiry of my plugin, or some other better way to handle this problem?