how to save gif animation with white or transparent background?

when i save gif as you can see in this code:
https://dl.dropboxusercontent.com/u/38094905/Shape_animation_script.m
the background is saved in gray color how can i save gif animation with white/transparent(same as when i save as png)?

답변 (2개)

Kevin Li
Kevin Li 2017년 7월 27일
편집: Kevin Li 2017년 7월 27일

3 개 추천

I have tried the following command and it works.
set(gcf, 'color', 'white');
In the command, "gcf" is "Current figure handle".
As for transparent background, you can change 'white' to 'none', but the background may display as black. I think it is because gif file does not support alpha channel as png does.

카테고리

도움말 센터File Exchange에서 Animation에 대해 자세히 알아보기

제품

질문:

2014년 10월 16일

편집:

2017년 7월 27일

Community Treasure Hunt

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

Start Hunting!

Translated by