Ok, achei o problema.
Eu tive que escapar das marcas de aspas no argumento, ou seja, substituir "
por \"
, para evitar que o shell as removesse antes de serem passadas para o GIMP.
Funciona como um encanto. Obrigado a todos pela leitura.
Estou tentando redimensionar imagens dinamicamente com o plug-in do GIMP Liquid Rescale .
Estou fazendo isso no meu Ubuntu Server 16.04 LTS usando o seguinte comando:
gimp -i -f -b "(batch-gimp-lqr-full "/var/www/liquid/uploads/feelsBadMan_2.png" "/var/www/liquid/distorts/feelsBadMan.png" 400 400 "" "" 1000 "" 1000 150 "" 7 150.0 TRUE TRUE 0 FALSE 3 0 0 FALSE 0 TRUE)" -b "(gimp-quit 0)"
Usando isso no meu sistema Windows está funcionando bem (mudando as seqüências do arquivo de entrada e saída, é claro.)
No Ubuntu, recebo as seguintes mensagens de erro:
(gimp:26440): GLib-GObject-WARNING **: g_object_set_valist: object class 'GeglConfig' has no property named 'cache-size'
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C64A60 from "gimp:point-layer-mode" to "gimp:dissolve-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C63D30 from "gimp:point-layer-mode" to "gimp:behind-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C64130 from "gimp:point-layer-mode" to "gimp:multiply-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C64540 from "gimp:point-layer-mode" to "gimp:screen-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C65A10 from "gimp:point-layer-mode" to "gimp:overlay-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C65E50 from "gimp:point-layer-mode" to "gimp:difference-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C66220 from "gimp:point-layer-mode" to "gimp:addition-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C66670 from "gimp:point-layer-mode" to "gimp:subtract-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C66A70 from "gimp:point-layer-mode" to "gimp:darken-only-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C66EA0 from "gimp:point-layer-mode" to "gimp:lighten-only-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C672D0 from "gimp:point-layer-mode" to "gimp:hue-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C67610 from "gimp:point-layer-mode" to "gimp:saturation-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C67A50 from "gimp:point-layer-mode" to "gimp:color-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C68420 from "gimp:point-layer-mode" to "gimp:value-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C68650 from "gimp:point-layer-mode" to "gimp:divide-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C68AE0 from "gimp:point-layer-mode" to "gimp:dodge-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C68EA0 from "gimp:point-layer-mode" to "gimp:burn-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C692D0 from "gimp:point-layer-mode" to "gimp:hardlight-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C69740 from "gimp:point-layer-mode" to "gimp:softlight-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C69B20 from "gimp:point-layer-mode" to "gimp:grain-extract-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C69F70 from "gimp:point-layer-mode" to "gimp:grain-merge-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C6A320 from "gimp:point-layer-mode" to "gimp:color-erase-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C6A6D0 from "gimp:point-layer-mode" to "gimp:erase-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C6AB40 from "gimp:point-layer-mode" to "gimp:replace-mode"
(gimp:26440): GEGL-gegl-operation.c-WARNING **: Cannot change name of operation class 0x1C6AEF0 from "gimp:point-layer-mode" to "gimp:anti-erase-mode"
batch command experienced an execution error:
Error: ( : 1) eval: unbound variable: /var/www/liquid/uploads/feelsBadMan_2.png
Alguém sabe onde começar a resolver isso?
Ok, achei o problema.
Eu tive que escapar das marcas de aspas no argumento, ou seja, substituir "
por \"
, para evitar que o shell as removesse antes de serem passadas para o GIMP.
Funciona como um encanto. Obrigado a todos pela leitura.