• 追加された行はこの色です。
  • 削除された行はこの色です。
TITLE:Animated_GIFファイルの消去手段
#navi(../)
*Animated_GIFファイルの消去手段 [#l4153c1c]
>編集者:[[Terai Atsuhiro>terai]]~
作成日:2007-05-14~
更新日:&lastmod;

#contents

**概要 [#l8f0cadc]
JLabelなどで使用できるAnimated_GIFファイルをテストします。

#screenshot

**サンプルコード [#z30a391c]
#code{{
JLabel label1 = new JLabel("何もしない   ",
  new ImageIcon(getClass().getResource("no_disposal_specified.gif")),
  JLabel.LEFT);
JLabel label2 = new JLabel("そのまま残す  ",
  new ImageIcon(getClass().getResource("do_not_dispose.gif")),
  JLabel.LEFT);
JLabel label3 = new JLabel("背景色でつぶす ",
  new ImageIcon(getClass().getResource("restore_to_background_color.gif")),
  JLabel.LEFT);
JLabel label4 = new JLabel("直前の画像に戻す",
  new ImageIcon(getClass().getResource("restore_to_previous.gif")),
  JLabel.LEFT);
}}
-&jnlp;
-&jar;
-&zip;

**解説 [#red85da1]
それぞれ異なる消去手段のAnimated_GIFファイルをJLabelに貼り付けてアニメーションをテストしています。上記のように透過色を使用する場合、3番目の「背景色でつぶす」にしておかないと残像が残ってしまうようです。

-何もしない
--No disposal specified. The decoder is not required to take any action.
-そのまま残す
--Do not dispose. The graphic is to be left in place.
-背景色でつぶす
--Restore to background color. The area used by the graphic must be restored to the background color.
-直前の画像に戻す
--Restore to previous. The decoder is required to restore the area overwritten by the graphic with what was there prior to rendering the graphic.

**参考リンク [#z45d5419]
-[[Cover Sheet for the GIF89a Specification>http://www.w3.org/Graphics/GIF/spec-gif89a.txt]]
-[[Giam ダウンロードのページ>http://homepage3.nifty.com/furumizo/giamd.htm]]

**コメント [#aa58fc4b]
#comment