For more frequent use, I would recommend creating a plugin to pop up an info box and assigning a keyboard shortcut, but that's a solution I'll leave to the reader. Here we see that there is a selection, and the width and height of the current selection are calculated.Īll of this can also be run from the Script-Fu console, but the code will look a little different. Here we see that there is no selection the dimensions of the image are shown instead. You can use different shapes to accomplish the effect you desire. This should bring up the image map editor where you are offered several tools. Once you have the image where you want it, find the menu Tools ->Web ->Image Map. With a little extra work, we can calculate the size of the selection based on the bounds we get back. Open The Image Map Editor In GIMP & Start Mapping. If you know what index the image you care about is in the gimp image list, you can pick it out directly so you don't have to sift through the others. > pdb.gimp_selection_bounds(gimp.image_list()) There will be more than one entry in the list if you have more than one image open. If you feather a selection, the dimensions will expand to cover even the slightest % selected pixels. Note that no matter how complex your selection is, you will still only get back information for a single rectangle encompassing all components of the selection. The 1 here indicates that the selection is not empty, the 124 and 180 show the x and y starting points for the selection, and the 310 and 257 show the x and y ending points for the selection. In Gimp 2.10, this data is exposed using the pdb.gimp_selection_bounds() function, which can be run from the Python Console (Filters/Python-Fu/Console): > Information about the current selection can be found, even before/after using the selection tools.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |