Animated GIFs performance

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
dkode
Posts: 9
Joined: 2018-04-23T11:26:53-07:00
Authentication code: 1152

Animated GIFs performance

Post by dkode »

Configuration :
OS: CentOs

identify -version

Version: ImageMagick 7.0.6-7 Q16 x86_64 2017-08-12 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC HDRI Modules OpenMP
Delegates (built-in): bzlib cairo djvu fftw fontconfig fpx freetype gslib jng jpeg lcms ltdl lzma pangocairo png ps tiff webp wmf x xml zlib


identify -list resource
Resource limits:
Width: 107.374MP
Height: 107.374MP
Area: 33.3722GP
Memory: 15.5401GiB
Map: 31.0803GiB
Disk: unlimited
File: 48750
Thread: 4
Throttle: 0
Time: unlimited

_____________________________________________________________

How to optimize imagemagicks performance wrt animated GIFS. Animated GIFS are taking long time for operations like resize.
Also coaslesce though help in frame synching is adding a fair amount of size.

I tried gifsicle which has better performance than imagemagick (for GIFS), Is there any way gifsicle can be used as a delegate ?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Animated GIFs performance

Post by fmw42 »

You can create your own entries in the delegates.xml file. But I am not sure how tightly coupled gif processing is in Imagemagick. I do not think it uses a delegate to do that work. One of the IM experts on delegates would have to help you on this.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Animated GIFs performance

Post by snibgo »

dkode wrote:Animated GIFS are taking long time for operations like resize.
IM has three main methods for resizing images, in increasing order of speed: "-resize", "-scale" and "-sample". I don't know which of these is closest to gifsicle's method.

IM works by decompressing images into memory, applying operations, then writing the images as files. So operations have no knowledge of file formats, and can't take short-cuts that knowledge might bring. For example, a GIF file has only 256 colours, but a IM "-resize" will often create many new colours that then need to be reduced to 256 before writing the file. A program that operates only on GIF files can resize differently and more quickly.

IM delegates are used for converting images from one format to another. IM has no ability to delegate operations such as "-resize" to another program.
snibgo's IM pages: im.snibgo.com
Post Reply