0
我想在.jpg中使用C#在windows phone中轉換.gif圖像 應用程序。如何將.gif圖像轉換爲使用C#的windows手機中的.Jpg
我想在.jpg中使用C#在windows phone中轉換.gif圖像 應用程序。如何將.gif圖像轉換爲使用C#的windows手機中的.Jpg
我不認爲有任何規定直接使用.gif圖像。但一種方法是獲取動畫的所有關鍵圖像並創建故事板,或者您可以使用第三方工具。
首先使用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(圖像工具)
你可以從CodePlex上的dll文件或者它只是谷歌。