Thanks Marco,
Your Module with wrapper finally works for me as expected.
Thank you very much.
Will it find its way into the distribution as an enhanced degrade module?

Greetings ant thanks again

Lutz

Am 15. Februar 2019 11:08:45 MEZ schrieb Marco Patzer <lists@homerow.info>:
On Fri, 15 Feb 2019 10:22:48 +0100
Lutz Haseloff <lutz.haseloff@toppkieker.info> wrote:

but both scripts trow the same error on windows and linux-armhf:

grph-downsample.lua:32: bad argument #2 to 'format' (number has no
integer representation)

It works here on linux-armhf. No Lua error. Maybe the file got
mangled during transmission.

I've uploaded a modified version to github, maybe try that one:

https://github.com/mpfusion/context-downsample

It includes a wrapper so you can call it like any other module
(\usemodule[downsample]). It's still Peter's code, but with small
modifications, so it degrades jpg as well as png images at the same
time. It's a quick hack, but works here, also on armhf.

Marco