WP7 / WP8 has no built-in functions for converting from JPG to PNG.
One good third-party structure to use if you only need to save the WriteableBitmap since the JPEG ToolStack C # PNG Writer Library .
var myBitmap = new WriteableBitmap(tempBitmap); // Create the destitnation stream. var pngDest = new System.IO.IsolatedStorage.IsolatedStorageFileStream("test.png", FileMode.Create, isoStore); // use the WriteableBitmap extension to write out the PNG myBitmap.WritePNG(pngDest);
If you need a more full-featured toolbox (like downloading JPG), check out WriteableBitmapEx and this great article by Rene Schulte @a href = "http://kodierer.blogspot.com/2009/11/convert-encode-and-decode-silverlight .html "rel =" nofollow "> Convert, encode, and decode Silverlight WriteableBitmap data
source share