GIMP get current image reference number to operate on current image

Viewed 946

I have more than one image open, and I'd like to run scrip-fu functions on the currently selected image. How can I get the image reference number to the currently selected image so I can use the reference in other functions (e.g. (gimp-image-width 7))? I'm using GIMP 2.10.12.

Using (gimp-image-list) lists all the image references:

> (gimp-image-list)
(12 #(12 11 10 9 8 7 6 5 4 3 2 1))
1 Answers

I've been using (gimp-image-latest) for this, which should work for the general case

Related