# -------------------------------
#@gmic resize_prop : pixel size
#@gmic : resize the largest side of the image (w or h)
#@gmic : to pixel size and the other in proportion
resize_prop : -check ${1}>0
-if {w>h}
-resize $1,{h/(w/$1)}
-else
-resize {w/(h/$1)},$1
-endif
# ------------------------------------
$ gmic -h resize_prop
gmic: GREYC's Magic for Image Computing.
Version 1.6.0.2 (beta), Copyright (c) 2008-2014, David Tschumperle.
(
http://gmic.eu/)
-resize_prop:
pixel size
resize the largest side of the image (w or h)
to pixel size and the other in proportion