Thank you all for your help.

First i tried the grph-downsample.lua script.
Unfortunately i get an error message
grph-downsample.lua:31: bad argument #2 to 'format' (number has no integer representation)
See attached log file.

Greetings Lutz

Am 14. Februar 2019 21:44:31 MEZ schrieb Hans Hagen <j.hagen@xs4all.nl>:
On 2/14/2019 9:32 PM, Peter Münster wrote:
On Thu, Feb 14 2019, Lutz Haseloff wrote:

I wanted to use the degrade module with recent ConTeXt and LuaTeX.
Hi Lutz,

Could you please check, if the module grph-downsample.lua could fit your
needs?


The minimal example from the degrade manual gives an error.
See the attached log.
Is there any chance to get the module working again?
There is always a chance. The question is just: who will afford the
efforts...
Please check first the downsample module, and then let's see, if you
still need this very old and hackish degrade module.
you can plug in code

\startluacode

figures.converters["png"]["lowres.png"] =
function(oldname,newname,resolution)
os.execute(string.format('gm convert "%s" "%s"',oldname,newname))
end

figures.converters["jpg"]["lowres.jpg"] =
function(oldname,newname,resolution)
os.execute(string.format('gm convert "%s" "%s"',oldname,newname))
end

-- figures.suffixes["lowres.png"] = figures.suffixes.png -- suffix is
automatically done

\stopluacode
\enabletrackers[graphics*]


\starttext
\externalfigure[t:/sources/mill.png][conversion=lowres.png]
\externalfigure[t:/sources/hacker.jpg][conversion=lowres.jpg]
\stoptext
Hans Hagen | PRAGMA ADE
Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
tel: 038 477 53 69 | www.pragma-ade.nl | www.pragma-pod.nl
If your question is of interest to others as well, please add an entry to the Wiki!

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