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
  Does gimp have optical filter imitations? godek 1 295 Dec 11, 2017 11:40
Last Post: paynekj
  Any plugin for open multiple image in paint.net shinprog 1 413 Oct 31, 2017 11:38
Last Post: paynekj
  plugin save for web in Gimp 2.9.6 Dkk 1 274 Oct 19, 2017 09:02
Last Post: paynekj
  Script-fu: How to create new, addressable layer using gimp-floating-sel-to-layer Bertholom√§us 1 340 Aug 31, 2017 14:32
Last Post: Bertholomäus
  Late binding / COM for opening an image into GIMP? i73 2 254 Aug 4, 2017 17:39
Last Post: i73

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS