Why does 'imwrite' not preserve transparency in animated GIFs?

9 views (last 30 days)
When creating an animated GIF using the 'imwrite' function, previous frames are not cleared. How do I clear them?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 18 Jan 2019
To make sure that previous frames are cleared, set pass the Option-Value pair ('DisposalMethod','restoreBG') to the 'imwrite' function.
An example with a reproduction of the issue and a solution is shown in the attached script.

More Answers (0)

Categories

Find more on Animation in Help Center and File Exchange

Tags

No tags entered yet.

Products


Release

R2017b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!