[NTG-context] setupexternalfigures and resoĺution

Henning Hraban Ramm texml at fiee.net
Thu Sep 1 10:56:55 CEST 2022

Am 01.09.22 um 10:51 schrieb Henning Hraban Ramm via ntg-context:
> Am 01.09.22 um 10:44 schrieb juh+ntg-context--- via ntg-context:
>> Hi,
>> what is resolution meant to do?

>> What am I missing?
> The resolution parameter is still not used by default ConTeXt, sorry.
> But you can use it with the attached lua file like:

This works also:

local function downsampler(oldname, newname, resolution)
     if not resolution or resolution == "" then
         resolution = 72
     local cmd = string.format(
       [[gm convert -resample %ix%i %s %s]],
       resolution, resolution, oldname, newname)

-- Set the PDF and default JPEG converters to the above function.
figures.converters.jpg.pdf = downsampler
figures.converters.jpg.default = downsampler

I didn’t manage to plug this into the "conversion" mechanism.


More information about the ntg-context mailing list