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
Hello,

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

Thanks.
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 :

Code:
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
  Gimp 2.10 with old vignette from Plugin registry. DenisT 2 44 Yesterday 20:42
Last Post: DenisT
  having trouble doing multiple cuts on gimp gloege 1 256 Mar 20, 2018 11:47
Last Post: paynekj
  UFRAW and Gimp 2.8 64-bit mlitty 2 2,938 Mar 13, 2018 04:04
Last Post: ythgilb
  PDN Plug-in for GIMP? snoopy55 9 9,318 Jan 29, 2018 08:23
Last Post: jandd661
  Does gimp have optical filter imitations? godek 1 467 Dec 11, 2017 11:40
Last Post: paynekj

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS