How to get the width and height of a layer in GEGL Graph ?

https://gegl.org/operations/gegl-scale-size-keepaspect.html
I want to use the scale-size-keepaspect function in GEGL Graph, scaling from the center of the layer, how to get the width and height of the layer in GEGL Graph.
How to write code to scale half of the original, it seems not to use the width/2 of this calculation.
:thinking: :thinking: :thinking:

I know what to do now.
The example code is as follows:
scale-size-keepaspect y=0.5rel

0.Xrel represents X0% of the original height value.

:grinning: :grinning: :grinning:

The sample documentation is very useful, but I didn’t read it carefully before.

# uncomment a set of lines below by removing the
# leading to test and modify an example, use
# use ctrl+a before typing to select all, if you
# want a blank slate.
#
id=in # name a reference to the input buffer 'in'


# adaptive threshold:
#
#threshold aux=[ ref=in gaussian-blur  std-dev-x=0.2rel std-dev-y=0.2rel ]

# local white balance and contrast stretching
#
#divide aux=[  ref=in  median-blur radius=.25rel percentile=100  gaussian-blur std-dev-x=.5rel std-dev-y=.5rel ]

# median sharpen (unsharp-mask with median-blur):
#
#add aux=[  ref=in subtract aux=[ ref=in  median-blur radius=5  ] ] 

# styled text overlay
#
#over aux=[ text wrap=1.0rel  color=rgb(0.1,0.1,.3) size=.1rel string="ipsum sic amet deliriarium mic sel adendum. Mic fubar bax qux facilium dhat." dropshadow radius=.01rel  grow-radius=0.0065rel color=white x=0 y=0 border-align x=0.5 y=0.33  ] # try x=1 y=1


# thumbs with misc filters along bottom of image:
#
#over aux=[
#  ref=in scale-ratio x=0.20 y=0.20 newsprint period=0.01rel period2=0.01rel period3=0.01rel period4=0.01rel color-model=cmyk aa-samples=64 pattern=pssquare pattern2=pssquare pattern3=pssquare pattern4=pssquare 
#  pack gap=0.05rel aux=[ ref=in scale-ratio x=0.20 y=0.20 newsprint period=0.01rel period2=0.01rel period3=0.01rel period4=00.01rel color-model=rgb aa-samples=64  ] 
#  pack gap=0.05rel aux=[ ref=in scale-ratio x=0.20 y=0.20 id=scaled snn-mean snn-mean crop aux=[ ref=scaled ] ] 
#  pack gap=0.05rel aux=[ ref=in scale-ratio x=0.20 y=0.20 mosaic tile-size=0.03rel ] 
#  border-align x=0.5 y=0.9
#]

# All the examples can be expanded to be on
# multiple lines, this graph description
# language is not whitespace sensitive, the
# rel suffix is relative to image height

Glad you found your way, welcome to the community!

I made an error in my previous writing, rel is only related to width.
But what if it’s not proportionally scaled? Sometimes I want to control the width proportionally, what should I do?
If I want to fill the current transparent layer , or want to fill 30% of the width,what should we do?

:thinking:

This dissection has been resolved, but there are other issues.

:yum: