It seems that the API demo stopped working due to a documented behavior change for the GraphicsMagick 1.3.40 release:

   API Updates:

   * AppendImageToList() now updates the image list pointer to be the
      image which was just added.  Use GetFirstImageInList() when the
      pointer to the first image in the list is needed.

GraphicsMagick rarely changes its API behavior.  This change was made due to observing performance issues with many (e.g. 10k) images in a list. It is much more efficient to remember the end of the list while appending additional frames to the list rather than re-starting from the beginning.

Bob

On 7/28/26 08:34, Christophe Beauregard wrote:
The following change to the demo code fixes the problem (which is what ConvertImageCommand() does):

$ diff demo.c.bak demo.c
68a69
>        thumbnails=GetFirstImageInList(thumbnails);

Presumably some change internally stopped the GIF coder from finding the head of the list, or the Append call changed the ordering, or something?

$ sh test.sh
libgraphicsmagick1-dev    1.4+really1.3.45+hg17696-1
Reading 1.png ... 1 frames
Reading 2.png ... 1 frames
Reading 3.png ... 1 frames
Reading 4.png ... 1 frames
Reading 5.png ... 1 frames
Reading 6.png ... 1 frames
Writing out.gif ... 6 frames
out.gif[0] GIF 106x80+0+0 PseudoClass 256c 8-bit 9.1Ki 0.000u 0m:0.000000s out.gif[1] GIF 106x80+0+0 PseudoClass 256c 8-bit 9.1Ki 0.000u 0m:0.000034s out.gif[2] GIF 106x80+0+0 PseudoClass 256c 8-bit 9.1Ki 0.000u 0m:0.000036s out.gif[3] GIF 106x80+0+0 PseudoClass 128c 8-bit 9.1Ki 0.000u 0m:0.000034s out.gif[4] GIF 106x80+0+0 PseudoClass 256c 8-bit 9.1Ki 0.000u 0m:0.000034s out.gif[5] GIF 106x80+0+0 PseudoClass 256c 8-bit 9.1Ki 0.000u 0m:0.000035s

Reply via email to