GIMP Chat
http://gimpchat.com/

how to get layer offsets from the main layer?
http://gimpchat.com/viewtopic.php?f=8&t=20445
Page 1 of 1

Author:  sakusammakko [ Tue Jul 18, 2023 3:40 am ]
Post subject:  how to get layer offsets from the main layer?

GIMP Version: 2.10.18
Operating System: Linux
OS Version: Ubuntu
GIMP Experience: Intermediate Level



So I have this big image (2000x1000px) with hundreds of smaller layers. I need to get the offsets automatically, somehow.

When I rightclick on the "Layer Attributes" I can see the offset values (Offset X & Offset Y). From here I could get the values, but I really don't want to do this manually hundred times. :(

Is it possible to run some script and save that data to either the layername or a txt-file. The format doesn't really matter.

Author:  rich2005 [ Tue Jul 18, 2023 6:02 am ]
Post subject:  Re: how to get layer offsets from the main layer?

You could use ImageMagick (IM), Using linux ? then probably still on IM6. Export your layered image to a tif file, then to list the offsets in a text file. (1)

identify -format ", %X %Y"  temp.tif > list.txt


Attachment:
offset.jpg
offset.jpg [ 159.78 KiB | Viewed 510 times ]


If you get the IM7 linux magick appimage from https://imagemagick.org/script/download.php then you can use Gimp xcf format similar syntax. (2)
Using kubuntu 22.04

Author:  sakusammakko [ Tue Jul 18, 2023 1:27 pm ]
Post subject:  Re: how to get layer offsets from the main layer?

:tyspin
Thanks! I can work with this. Just need to make some scripts.

Author:  ofnuts [ Wed Jul 19, 2023 1:52 am ]
Post subject:  Re: how to get layer offsets from the main layer?

I don't know why you want to get just the offsets. If you need to get positions of things in an image, a quick and easy way is to draw a polygonal path. You then have API to retrieve the path anchors coordinates. I even have a script to export the path points coordinates in a CSV.

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/