[NTG-context] Re: access image properties in Lua

2023-07-18 Thread Henning Hraban Ramm
(I assume you didn’t reply privately on purpose and take this back to the mailing list.) Am 18.07.23 um 12:47 schrieb Alan Braslau: P.S. I have not used the built-in resolution= image conversion (using gm/ImageMagik). I imagine that ConTeXt is clever enough to store the converted file so that

[NTG-context] Re: access image properties in Lua

2023-07-17 Thread Alan Braslau via ntg-context
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.

[NTG-context] Re: access image properties in Lua

2023-07-17 Thread Henning Hraban Ramm
Am 17.07.23 um 15:44 schrieb Alan Braslau via ntg-context: On 13/07/23 13/07/23, 09:19, Hans Hagen wrote: On 7/11/2023 2:22 PM, Henning Hraban Ramm wrote: What’s the current approved way to get image properties within a Lua function? I’d like to know the pixel size and if possible also the

[NTG-context] Re: access image properties in Lua

2023-07-17 Thread Alan Braslau via ntg-context
On 13/07/23 13/07/23, 09:19, Hans Hagen wrote: On 7/11/2023 2:22 PM, Henning Hraban Ramm wrote: What’s the current approved way to get image properties within a Lua function? very old: local pic = figures.getinfo(figures.current().status.fullname) used to work in 2019: local pic =

[NTG-context] Re: access image properties in Lua

2023-07-13 Thread Hans Hagen
On 7/11/2023 2:22 PM, Henning Hraban Ramm wrote: What’s the current approved way to get image properties within a Lua function? very old: local pic = figures.getinfo(figures.current().status.fullname) used to work in 2019: local pic = img.scan{filename = figures.current().status.fullname} if