NickeManarin / ScreenToGif

🎬 ScreenToGif allows you to record a selected area of your screen, edit and save it as a gif or video.
http://www.screentogif.com
Microsoft Public License
23.53k stars 2.17k forks source link

[feature request] cache for saving with different frame speeds #211

Open JohannesMP opened 6 years ago

JohannesMP commented 6 years ago

If you save a gif, where it is analyzed for changes between frames and then saved to a file, that information could be preserved to make saving the gif much faster if all the user does is change frame times.

For example, if you save a gif with frame timings of 50 ms, but realize that that is too slow, overriding frame times to 30 ms would not change the individual frame-to-frame compression that has to occur when saving. Even modifying individual frames, such as extending a frame in case where it contains text that otherwise would disappear too quickly to be readable, would not change the frame-to-frame compression.

It should be possible to cache the compression data after saving the gif the first time, and use that on subsequent saves. Changes like overriding or decreasing frame times would not invalidate the cache, but reversing, transitions, etc. would.

This would vastly speed up workflows where all that a user does is change frametimes.

Since such a cache would take up additional system memory, this could be an option in the save dialogue or settings, so that users that don't often modify frame times as part of their workflow don't have additional memory usage for something they don't benefit from.

NickeManarin commented 6 years ago

Alright. :)

Just to add some details of how it works right now: