Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How can I reset this number to 0 without to have to quit the software?
#5
(04-25-2023, 08:35 PM)Watler253 Wrote: Thanks both for the answers.

I asked cause I've a script "fu" that do things on image ID 1 to 100, so if want to repeat the script on another group of image I've to quit the app to reset that number so the script work. I guess I can increase the number ID on my script up to 1000 but it's not an elegant solution as I've then to pick the portion of the script for the current ID, like if I'm at 60 and I've up to 120 I pick the line that change them, so it's best to quit the software and launch it again.

Here is the script line :
(gimp-image-scale ID 128 128)
ID for the number of the image.
Repeated up to 100 times to quickly scale a group of images.

Your script can get the list of loaded images ((gimp-image-list), in script-fu, I think), no need to iterate image ids at random...

In the python console, to scale all loaded images:

Code:
for image in gimp.image_list(): image.scale(120,80)
(strike [enter] until you are back to the > > > prompt)


The script-fu equivalent isn't much more complicated (but I don't know script-fu).
Reply


Messages In This Thread
RE: How can I reset this number to 0 without to have to quit the software? - by Ofnuts - 04-25-2023, 09:25 PM

Forum Jump: