Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with "dither:diffusion-amount=20%" in spawn #47

Open
v11 opened this issue Dec 23, 2020 · 0 comments
Open

Problem with "dither:diffusion-amount=20%" in spawn #47

v11 opened this issue Dec 23, 2020 · 0 comments

Comments

@v11
Copy link

v11 commented Dec 23, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant