Re: [Gimp-user] How to get the positions(x, y) (width, depth) of selected rectangle or selected ellipse

Uh? You can write to a file from the script, using the regular I/O

For more structured data you can also use the built-in CSV module to
write CSV files, and it is also possible to add excel support to the
python runtime.

On 2/14/20 8:19 AM, ShiroYuki Mot via gimp-user-list wrote:
On Python console, this is what you want.
non_empty, x1, y1, x2, y2 = pdb.gimp_selection_bounds(image)
See, 'gimp-selection-bounds' at Procedure Browser.
But, handning values to external App is not so easy.
If you add external library 'pyperclip' you can write to clipboard.
But it is one value only... Yes, maybe, not suit for you.
One solution is that create text layer about that.
Then you can copy manually.

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]