Problem saving (animated) gif using G'MIC script

Hello G’MIC Fans…

I had some errors when trying to save an animated gif using a G’MIC script on my Win11 system.
After several unsuccessful approaches I stumbled about below thread. - My errors were similar enough (tough not identical):

I tried the two sample commands of that thread, and received the following errors:

[gmic]-0./ Start G'MIC interpreter.
[gmic]-1./ Input sample image 'lena' (1 image 512x512x1x3).
[gmic]-1./ Input sample image 'tiger' (1 image 750x500x1x3).
[gmic]-2./ Output images [0,1] as gif file 'dst.gif'.
[gmic]-2./ *** Error *** Command 'output': [instance(512,512,1,3,000001b0f59f4040,shared)] gmic<float32>::save_other(): Failed to save file 'dst_000000.gif'. Format is not natively supported, and no external commands succeeded.
[gmic] Command 'output' has the following description: ....


[gmic]-0./ Start G'MIC interpreter.
[gmic]-1./ Input sample image 'lena' (1 image 512x512x1x3).
[gmic]-1./ Input sample image 'tiger' (1 image 750x500x1x3).
[gmic]-2./ Output images [0,1] as animated gif file 'dst.gif', with 1 fps.
[gmic]-2./ *** Error *** Command 'output': [instance(2,16,000001a30187b8f8)] gmicList<float32>::save_gif_external(): Failed to save file 'dst.gif' with external command 'magick/convert'.
[gmic] Command 'output' has the following description: ....

Especially the last error appears to point to a potential relation to a *Magick installation.
And this second error is exactly what I got within my own script.

I have no *Magic installed explicitely.
There is however enough (open source) software around on my system which may well include ImageMagick/GraphicsMagick.

I don’t know how G’MIC is searching for *Magick libraries, so I checked the system paths.
The only suspicious hint was to a texlive installation which can use ImageMagick.
I did however not find an installed package, so I also don’t know something like a version (WIN command line appears not to know imagemagick).

But anyhow - even if I should find some *Magick on my system - please expect that I don’t have much control about this installation.

Hence - Is there a way to avoid that G’MIC is searching for these *Magick libraries (and to force it to use its own possibilities if possible)?

Please however tell if you think that there is any other possible error - I’m an absolute beginner in G’MIC, so I may well make a basic error.
Also please tell if you need further input, e.g. about my actual use case (a more verbose output appear however not to show additional error specific information).

G’MIC 3.1
Win 11

Thanks in advance!

@gannjondal Welcome to the forum! Install ImageMagick and then add it to path. A quick search may help. Maybe: Open with a command line tool on Windows - #9 by afre.

Let us know if that link helped. I have been busy and not in the best health recently, so I will pass this on to @David_Tschumperle @Reptorian and friends.

@afre - Thank you for your fast response!
Yes, installation of imagemagick did help.
Originally I wanted to avoid an extra installation; but since it helps, and it seams (until now) not to break anything else I will continue to work that way.

I would just like to clarify one point, if possible:
Is imagemagick a prerequisite for G’MIC (I thought you see yourselves as a kind of competitor :wink:),
or is your suggestion more a pragmatic approach for cases where for instance a user cannot completely control the *magick libraries spread over the system?

Thank you again!

Generally, FLOSS scene is not competitive. Where people are concerned, I guess there will always be the mean and aggressive ones… and where money and fame are the bottom line, as opposed to collaboration and providing the masses with free open-source software.

G’MIC uses IM and OpenCV libraries to read and output files. Why isn’t IM bundled like some other libraries? The short explanation is its licence is different from G’MIC’s.

  1. Not a competitor. Excerpt from the web page:

gmic, a command-line tool to use the G’MIC image processing features from a shell. In this setting, G’MIC may be seen as a friendly companion to the ImageMagick or GraphicsMagick software suites.

  1. IM is not a pre-requisite for G’MIC. G’MIC does not even use the IM libraries to load/save image data. IM is simply used as a fallback when trying to load/save an image format that is not natively supported by G’MIC. This is indeed the case for the .gif file format.

  2. IM is far superior to G’MIC for managing image file formats, including exotic ones. The purpose of G’MIC is mainly image processing, definitely not conversion between image file format (I guess nobody can beat convert for this purpose). G’MIC supports the most common image file formats (.jpg, .tiff, .png and so on), but that’s all.

Thank you & Merci beaucoup for your clarifications, @David_Tschumperle, and @afre .
They help me to better understand the relations, and the tasks of the two suites.