NODEJS Как я могу получить ввод пути в gifsicle?

используя gifsicle

Я пытаюсь изменить размер загруженного анимированного файла gif.

Но кажется, что я не узнаю путь в gifsicle.

      Error: Command failed: C:\Users\USER\Desktop\giftest\node_modules\gifsicle\vendor\gifsicle.exe -o testtttt.gif upload/test.gif #0-30

C:\Users\USER\Desktop\giftest\node_modules\gifsicle\vendor\gifsicle.exe:upload/test.gif: No such file or directory
      console.time("execute time");
execFile(
  gifsicle,
  ["-o", "output.gif", "upload/input.gif", "#0-30"],
  (err) => {
    console.timeEnd("execute time");

    if (err) {
      console.log(err);
    } else {
      console.log("image resized!");
    }
  }
);

Я хочу загрузить upload/input.gif . Но gifsicle, похоже, распознает только пути «/».

Любое решение?

0 ответов

Другие вопросы по тегам