Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour of ImageMagick when open gif file #6592

Open
Urozhaeva opened this issue Aug 28, 2023 · 3 comments
Open

Unexpected behaviour of ImageMagick when open gif file #6592

Urozhaeva opened this issue Aug 28, 2023 · 3 comments

Comments

@Urozhaeva
Copy link

Urozhaeva commented Aug 28, 2023

ImageMagick version

6.9.12-93

Operating system

Linux

Operating system, version and so on

ALT Workstation 10.1, ALT Server 10.1

Description

According to the ImageMagick's documentation, application works with gif format:
GIF CompuServe Graphics Interchange Format 8-bit RGB PseudoColor with up to 256 palette entries. Specify the format GIF87 to write the older version 87a of the format. Use -transparent-color to specify the GIF transparent color (e.g. -transparent-color wheat).

But ImageMagick's bihaviour is different with different gif files

Steps to Reproduce

  1. Open different gif files (without animation, with animation and with 3 colors, with animation and with 256 colors)

Results:

  1. Gif file without animation is closed after several seconds
  2. Gif file with animation and with 3 colors is closed after animation. The file is displayed correctly
  3. Gif file with animation and with 256 colors is closed after animation. The file is displayed incorrect

Images

Gif files for reproducing:
1
file
2

@urban-warrior
Copy link
Member

ImageMagick respects the GIF delay and loop meta data. Add -loop 0 to your command-line to loop continuously rather than exit.

@Urozhaeva
Copy link
Author

I've added -loop 0 to my command line: $ display *.gif -loop 0 and $ display *.gif -loop 0 -delay 1
And it didn't help. ImageMagick closes after 1st loop. The same behaviour when you set any number for the loop.
I also tried to convert gif file: $ convert -loop 0 *.gif *_conv.gif but it didn't help too. ImageMagick closes after 1st loop.
Please note it correct converts gif file if you set number more than 1 for loop.

Please note I also have problems with displaying of gif file which contains 256 colors. Take a look at attachments
Incorrect_display_of _gif_file.tar.gz

@fmw42
Copy link

fmw42 commented Sep 21, 2023

This works for me on IM 6.9.12-95 Q16 Mac OSX Ventura with your first animation above. Read the input before any settings or operators.

convert animation.gif -loop 0 x.gif

x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants