On 17/07/23 17/07/23, 18:20, Henning Hraban Ramm wrote:
Bonus question: how also to handle the case of
\startMPcode
draw figure "MyFigure" xsized TextWidth ;
...
\stopMPcode

Is MyFigure a pixel image?
You could use \externalfigure within MP code.

The MP operator figure calls \externalfigure.
However, the resolution downsampler hooked into externalfigure as you suggest would not give the desired resolutions once resized in MP.

A solution might be to use
draw rawtextext("\externalfigure[MyFigure][width=\textwidth") ;
which is OK for this simplified example but would not work when more sophisticated MetaPost transformations might be needed.



Along the lines of the conversion downsampler, a resolution reporter and manual resampling could be more efficient than reconverting the bitmap image at every run, of which there can be many.

--
Alan
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / https://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : https://www.pragma-ade.nl / http://context.aanhet.net
archive  : https://bitbucket.org/phg/context-mirror/commits/
wiki     : https://contextgarden.net
___________________________________________________________________________________

Reply via email to