Re: convert -append unhalt

Bob Friesenhahn <[email protected]>
Newsgroups gmane.comp.video.graphicsmagick.help
Message-ID <[email protected]>
On Wed, 27 Dec 2017, [email protected] wrote:

> 	You can download the original cartoon at https://media.newyorker.com/cartoons/5a3d99a75e8c9840cf254750/master/+w_1626,c_limit/DC122717.gif
>
> 	The caption is 'Snapchat's newest filter.', which text2gif  made a 200x8 gif from, convert -resize changed to 1075x43.
>
> 	I notice that it continually creates 7MB files in /tmp; I stopped at 23.

This GIF file has 75 frames with dimensions 1088x1088, making for 
quite a lot of pixel data (88,780,800 pixels).  On my computer this 
file reads quite quickly without using temporary files, but my 
computer has a lot of RAM.

GraphicsMagick reads all the frames from the GIF before deciding how 
to render them.  It is likely that web browsers are able to render 
animated GIFs immediately as the data arrives (as long as the GIF does 
not loop) so they don't need to use so much memory.  This is ok for 
web browsers since they are not required to preserve the inputs.

You can limit the number of frames which are read like

gm convert DC122717.gif[0] foo.gif

   or

gm convert DC122717.gif[0-5] -flatten foo.gif

Bob
-- 
Bob Friesenhahn
[email protected], http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.