Page 1 of 1

How to make watermarking of frames faster

Posted: 2010-12-05T14:00:27-07:00
by gudata
Hello,
I have a folder where I have unoptimized frames generated from a gif file. Now I want to put back those frames but with a watermark.
I expect to have a gif file at the end with all frames (each frame with a watermark).

Also I think(hope) that doing this with one command will be much faster than just stamping every frame on separate folder, and then putting them back to gif.

here is what I tried.

Code: Select all

convert temp/??.png null:  watermark.png  -gravity south  -layers composite  ani.gif
This takes 20 seconds and for sure I will be killed by my boss if put this on-line :(

The strange thing is that almost the same images on the /png folder (which are bigger) tooks only 1sec.
  • temp/??.png + watermarkng -> 20sec
    png/??.png + watermarkng -> 1sec
What I am doing wrong with the 20sec image generation?


Here is the zip file with all the images http://gudasoft.com/dl/zip.zip

Re: How to make watermarking of frames faster

Posted: 2010-12-05T14:15:58-07:00
by fmw42
I am not an expert animatios. But I don't think you can do it faster. You probably need a faster computer or with more memory so you don't thrash to disk. You never said how big the files were nor how many frames.

Re: How to make watermarking of frames faster

Posted: 2010-12-05T14:31:01-07:00
by magick
GIF is restricted to 256 colors and the color reduction portion of your workflow is consuming most of the time. In our tests, we saved to the MIFF image format in 0.25 seconds, whereas the GIF format required 11 seconds.

Re: How to make watermarking of frames faster

Posted: 2010-12-06T01:05:20-07:00
by anthony
You may be able to quantize the images to a common colormap first! That should make it a lot faster.

Hmmm checking the zip... the "png" directory images are already color reduced, so IM does not need to do this. BUT the "temp" images are resized and have lots of colors, and thus needs a lot of color reduction before they can be saved a GIF.

You may like to look at PNG color recudion programs, such as
pngquant
http://www.libpng.org/pub/png/apps/pngquant.html
pngnq
http://www.cybertherial.com/pngnq/pngnq.html
pngout -- Windows specific - a compressor with 8 bit pallet options
http://www.advsys.net/ken/utils.htm

Other than that you must remember IM is a general image processor designed with a LOT of image file formats. Pallette images are not its forte. You may be able to do more with a specific GIF animation program though you won't do much else.

Free ones include...
InterGIF
http://utter.chaos.org.uk/~pdh/software/intergif.htm
Gifsicle
http://www.lcdf.org/gifsicle/


however I have tried these programs (though it was more than four years ago) and found both to have some problems with some specific types of GIF animations.

Re: How to make watermarking of frames faster

Posted: 2010-12-06T10:51:04-07:00
by gudata
Thank you very much for the responses!

Will try and give feedback.