Problem with "dither:diffusion-amount=20%" in spawn
Hello
I am building a small webapp with Firebase to provide e-paper-ready images. To convert images to bitmap i am using a cloud function (node.js) and the Imagemagick Library.
I have the following string in a Node.js Firebase Cloud Function:
await spawn('convert', [tempFilePath, '-resize', displaySize + '^', '-gravity', 'center', '-extent', displaySize, dither, ditherValue, '-define', 'dither:diffusion-amount=20%', '-remap', tempFilePath_Map, '-type', 'Palette', 'BMP3:' + tempFilePathBitmap]);
Which should be equal to this:
convert image.pngl -resize 600x448^ -gravity center -extent 600x448 -dither FloydSteinberg -define dither:diffusion-amount=20% -remap eink-7color.png -type Palette, BMP3:images.bmp
It works very well. But: The following option has no effect:
dither:diffusion-amount=20%
Has it something to do with the %-sign? Do i need to escape it correctly? I think Google is is running ImageMagick 7.0.10-48. And other guys confirmed that this command should work with this version.
[https://github.com/ImageMagick/ImageMagick/discussions/3023]
Any help is very welcome.
Lukas