03-15-2019, 05:48 PM
Hello, I want to use GIMP to extract 200 small images from a set of larger images, which are uniformly structured. I have figured out how to use image_select_rectangle to do the initial selection, in both Python fu and Script fu, though in Python I am still working on learning the syntax to identify [Image] correctly.
I need to flush out a script that will copy the selection to a new file and save it to a folder, with an incremented filename each time.
I will also need to write a bit of code to update the x,y coordinates of the corner of each selection, which are 4x5 groups of 5x2 images (200 total images). I have basic programming skills but I haven't really used them in several decades - I learned C++ when it was - BRAND NEW.
So I am wondering which of the two scripting modules will be easier to use to write a small/short routine to increment the x,y value for each selection from the larger image?
A hint towards the basic increment variable routine that would be used to increment the parameters in image_select_rectangle would certainly speed things up. As would the needed syntax on incrementing the file name on the output call. Any tips would be much appreciated.
I need to flush out a script that will copy the selection to a new file and save it to a folder, with an incremented filename each time.
I will also need to write a bit of code to update the x,y coordinates of the corner of each selection, which are 4x5 groups of 5x2 images (200 total images). I have basic programming skills but I haven't really used them in several decades - I learned C++ when it was - BRAND NEW.
So I am wondering which of the two scripting modules will be easier to use to write a small/short routine to increment the x,y value for each selection from the larger image?
A hint towards the basic increment variable routine that would be used to increment the parameters in image_select_rectangle would certainly speed things up. As would the needed syntax on incrementing the file name on the output call. Any tips would be much appreciated.