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.
Kobi
Kobi 2014 年 10 月 18 日

0 投票

is it even possible?

カテゴリ

ヘルプ センター および File ExchangeAnimation についてさらに検索

製品

質問済み:

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