I would like to ask if there is any way in ImageMagick which would help in the following case:
- I have a sequence of images (frames from a video) as the source for an animated GIF.
- Only a small amount of pixels change between frames - eg. most of the canvas remains unchanged between adjacent frames (for example, a small ball moving on a static field).
- When I simply convert the images into an animated GIF, the resulting file will be roughly as large as the sum of all input files (despite only a few pixels needing to be updated).
Is there a method in ImageMagick which would compare the adjacent image segments and automaticaly remove the pixels that did not require a change?
I've tried using the various available optimization methods (-deconstruct, -layer Optimize, etc.) but either I'm doing something wrong, or none of them were designed to handle the above mentioned case.
I can achieve what I need by doing it manualy - ergo painstalkingly removing most of those static pixels in an editor, and then using the modified images for input. This however is not really feasible when the sequence contains a larger amount of frames (like from a video).
My aim is to optimize the size of the final GIF file, where by this method it can be signifficantly reduced (up to a few orders of magnitude in speciffic cases) without a change in visual appearance (when compared to the much larger static full canvas sequence).
Hope I've managed to explain the problem clearly enough for anyone to understand
I would be grateful for any kind of advice on how I could achieve this without the need to edit all frames manualy in editor
Thanks in advance
Jason