简体   繁体   English

生成中的编码/转义(Node.js,子进程)

[英]Encoding/Escape in spawn (Node.js, Child-Process)

I have the following string in a Node.js Firebase Cloud Function:我在 Node.js Firebase Cloud Function 中有以下字符串:

await spawn('convert', [tempFilePath, '-resize', displaySize + '^', '-gravity', 'center', '-extent', displaySize, dither, ditherValue, '-define', 'dither:diffusion-amount=85%', '-remap', tempFilePath_Map, '-type', 'Palette', 'BMP3:' + tempFilePathBitmap]);

The following option is not executed in the firebase backend. firebase 后端不执行以下选项。 Everything else works fine.其他一切正常。

dither:diffusion-amount=85%

I assume, i need to escape some characters in this string.我假设,我需要转义这个字符串中的一些字符。 How can i do that?我怎样才能做到这一点?

Thanks.谢谢。

It seems, that Google is running on an older version (V.6) of Imagemagick which is not supporting dither:diffusion-amount.看来,谷歌正在运行不支持抖动:扩散量的 Imagemagick 的旧版本(V.6)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM