8 Jul
2018
8 Jul
'18
1:35 a.m.
On Sat, 7 Jul 2018 22:27:51 +0200
Hans Hagen
On 7/7/2018 8:58 PM, Marco Patzer wrote:
Hi!
How to scale an image in MetaPost, maintaining the aspect ratio (without specifying the height explicitly)?
Example:
\setupexternalfigures [location=default] \starttext \externalfigure [cow][width=5cm]
\startMPcode draw externalfigure "cow" scaled 5cm; \stopMPcode \stoptext it's all in the metafun manual
No doubts about that. It's more a matter of knowing what to search for.
xsized 5cm
I tried it, same result - square image: draw externalfigure "cow" xsized 5cm; As Alan mentioned including the image with textext() works. Not as elegant, but it gets the job done. Marco