Post Reply 

Referencing multiple images open in Gimp

Jun 4, 2012, 10:44 (This post was last modified: Jun 4, 2012 11:00 by bippered.)
Post: #1
Referencing multiple images open in Gimp

I have written a couple of *python* scripts which operate on images which are already open. They resize, and save images (including thumbnails) and append simple html code to a file when I press a hotkey.

I want to be able to batch process all open images, without having to save them first or use the Gimp batch processor. Is it possible to do this ? - I have read that it may not be possible to reference specific individual open files, but can I make a simple loop for the already open images using some form of : image = gimp.image_list()[0].

I know this is simple, but I want to know if it is possible before I attempt it Smile

Find all posts by this user
Quote this message in a reply
Jun 4, 2012, 16:03
Post: #2
RE: Referencing multiple images open in Gimp
I just wanted to know if It could be done, before I tried the impossible Smile

I managed to do it by calling the original processing script (called 'eBay_Multi_Image') using the following :

def BatchTable(timg, tdrawable):
        images = gimp.image_list()
        imageno = len(images)
        x = 0
        while (x < imageno):
              currimg = images[x]
              currdrawable = pdb.gimp_image_get_active_drawable(currimg)
              pdb.python_fu_eBay_Multi_Image(currimg, currdrawable)
              x = x + 1

Probably not the nicest bit of code Smile - but it did the job.
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Script Fu Errors Gimp 2.10.4 lightsaber jd3481 1 724 Aug 2, 2018 05:13
Last Post: paynekj
  GIMP Resynthesizer Plugin not working Mikkel Andersen 1 698 Jun 26, 2018 16:36
Last Post: paynekj
  Tablet issues with GIMP 2.10 Phoenisca 1 778 May 30, 2018 14:30
Last Post: paynekj
  addonCollectionManager-3.0 on Gimp 2.10.2 (Solved) Pocholo 0 508 May 26, 2018 02:26
Last Post: Pocholo
  Gimp 2.10 with old vignette from Plugin registry. DenisT 2 536 May 19, 2018 20:42
Last Post: DenisT

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS