find . -name "*xcf" | xargs -l -i basename "{}" ".xcf" | xargs -l -i convert "{}.xcf" "{}.jpg"
https://forums.linuxmint.com/viewtopic.php?p=1089649#p1089649
outra forma - https://gist.github.com/danstuken/3625841
surgiu o seguinte erro na conversão dalguns ficheiros:
convert-im6.q16: memory allocation failed `top_melhorada.xcf' @ error/xcf.c/ReadXCFImage/1354.
ver isto https://stackoverflow.com/questions/66230378/imagemagick-convert-ooming… e isto https://blog.keithkim.com/2021/04/note-convert-memory-allocation-failed…
apesar de ter movido o ficheiro /etc/ImageMagick-6/policy.xml para /etc/ImageMagick-6/policy.xml.bak e o resultado do comando:
convert -list resource
ser:
Resource limits:
Width: 16KP
Height: 16KP
List length: 18.446744EP
Area: 128MP
Memory: 4GiB
Map: 512MiB
Disk: 1GiB
File: 768
Thread: 8
Throttle: 0
Time: unlimited
continua a não ser possível converter alguns fichairos.
investigar mais ...
não sei se está relacionado mas...
convert-im6.q16: attempt to perform an operation not allowed by the security policy `PDF' @ error/constitute.c/IsCoderAuthorized/421.
está relacionado com uma falha de segurança no postscript e aqui está um bug relacionado https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=907336
a solução encontra-se aqui https://askubuntu.com/questions/1181762/imagemagickconvert-im6-q16-no-i… e passa por ativar os formatos que dão erro. para tal, no ficheiro /etc/ImageMagick-6/policy.xml alterar:
para