![]() ![]() 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. With a little extra work, we can calculate the size of the selection based on the bounds we get back. 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()) I used Pixen (osx, ios) in the past for my pixel art in a game I made. To customize the grid, open the Image menu and choose Configure Grid. Beyond that, just about anything from gimp to photoshop will do the trick. ![]() The default settings create a 10-pixel grid, and that’s not quite detailed enough for what we need. First, turn the grid on by opening the Edit menu and enabling the Show Grid option. There will be more than one entry in the list if you have more than one image open. To make things easier, GIMP provides an overlay grid option that can be totally customized. 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. |