PegLeg44 wrote:
But if I have an image already open I don't know how to get the image ID. Or maybe there's some other procedure that should be used.
Within the Script-fu console, you can determine the image ID using several different methods.
If you have your Preferences configured suitably and have a window manager that displays a title bar, the image ID will appear after the filename in the windows title bar. The ID follows the filename, separated by a hyphen.
If the above isn't available, you can oftentimes see the same name in the status line of GIMP's image window. Again, it follows the image name separated by a hyphen convention. The image ID is typically followed by a ".0", but the zero is actually the 'display ID' and, if you have opened more than one display for the image (using "Image->View->New View"), it may be different.
If you open the Images dock ("Image->Windows->Dockable Dialogs->Images") you will see a list of available images, with the image/file name followed by a hyphen, followed by the image ID. You will also find this information (name
-#) at the top of any of the dialogs that appear when you perform interactive image commands (e.g., Canvas Size, Print Size, Scale Image). The second point is worth noting because it works for Layers and Paths, which otherwise don't have their IDs displayed in the corresponding dock (e.g., you can open the Scale Layer dialog to find the layer ID).
Thanks much soulgoode. I will save this info in my new folder named "Making Scripts Info" in case I forget.