0

Windows Phone アプリケーションで C# を使用して .gif 画像を .jpg に変換したい。

4

1 に答える 1

2

.gif 画像を直接使用する規定はないと思います。ただし、1 つの方法は、アニメーションのすべてのキー イメージを取得してストーリーボードを作成することです。または、サード パーティのツールを使用することもできます。

最初に Httprequest または Webclient を使用して画像 (任意) をダウンロードし、次の方法で gif (gif の場合) から jpg または png に変換します。

GifDecoder gd = new GifDecoder();
ImageTools.ExtendedImage img = new ImageTools.ExtendedImage();
gd.Decode(img, stream);              //stream means image stream
PngEncoder png = new PngEncoder();
png.Encode(img, isoFileStreamdownload);  //isoFileStreamdownload means stream, which is used to save image in image file like(image.png))

ImageTools.dll、ImageTools.IO.Gif.dll、ImageTools.IO.Png.dll (画像ツール) の使用

dll ファイルは codeplex から取得するか、Google で検索してください。

于 2013-04-05T10:05:00.890 に答える