【问题标题】:Encoding/Escape in spawn (Node.js, Child-Process)生成中的编码/转义(Node.js,子进程)
【发布时间】:2021-03-31 18:51:59
【问题描述】:

我在 Node.js Firebase 云函数中有以下字符串:

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

以下选项未在 firebase 后端执行。其他一切正常。

dither:diffusion-amount=85%

我假设,我需要转义这个字符串中的一些字符。我该怎么做?

谢谢。

【问题讨论】:

  • 你想要那个方括号在字符串中吗?
  • 不,就是这样:dither:diffusion-amount=85%

标签: node.js firebase promise imagemagick child-process


【解决方案1】:

看来,Google 是在不支持 dither:diffusion-amount 的旧版本 (V.6) Imagemagick 上运行的。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-05-22
    • 2015-10-30
    • 1970-01-01
    • 2011-09-25
    • 2014-07-05
    • 2019-03-22
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多