08-14-2022, 03:15 PM
See (gimp-image-width image) and (gimp-image-height image) to get the image width and height. Getting the sizes of layers is pointless here because you'll be scaling the image and not the layers.
The best way to find an answer to this kind of questions if to start the Scrip-fu console (Filters ➤ Script-fu ➤ Console) and then hit the Browse... button and try the terms in the search bar at the top left:
The best way to find an answer to this kind of questions if to start the Scrip-fu console (Filters ➤ Script-fu ➤ Console) and then hit the Browse... button and try the terms in the search bar at the top left: