It is currently Thu Jul 04, 2024 4:10 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: how to get layer offsets from the main layer?
PostPosted: Tue Jul 18, 2023 3:40 am  (#1) 
Offline
New Member

Joined: Jul 18, 2023
Posts: 3
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.


Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: how to get layer offsets from the main layer?
PostPosted: Tue Jul 18, 2023 6:02 am  (#2) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2438
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 507 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

_________________
Image


Top
 Post subject: Re: how to get layer offsets from the main layer?
PostPosted: Tue Jul 18, 2023 1:27 pm  (#3) 
Offline
New Member

Joined: Jul 18, 2023
Posts: 3
:tyspin
Thanks! I can work with this. Just need to make some scripts.


Top
 Post subject: Re: how to get layer offsets from the main layer?
PostPosted: Wed Jul 19, 2023 1:52 am  (#4) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4756
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.

_________________
Image


Top
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Shortcuts to 2.10 documentation re: Layer & Layer-group modes

0

No new posts Attachment(s) Adding a image as a layer, moving layer, and then flattening

2

No new posts How do I script a new white layer to the bottom of the layer stack

7

No new posts Add layer mask hides the entire layer

3

No new posts LAYER

3



* Login  



Powered by phpBB3 © phpBB Group