Open JohannesMP opened 6 years ago
Alright. :)
Just to add some details of how it works right now:
The frames are only analyzed if the option Detect unchanged pixels is enabled. (So, if you disable this option right now, you can speed up your framerate tests)
The frames are cut (if they retain the same pixels of the previous frame) and saved into a new file inside a temp folder.
This temporary folder gets deleted after the encoding, so the analyzed frames are lost.
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.