i have a PNG file and i would convert into JPG The PNG is a large size(high resolution) (for example 30/40MB)
if i use this code receive a memory leak
using (var fileStream = myIsolatedStorage.OpenFile("1.png",FileMode.Open,FileAccess.Read))
{
WriteableBitmap wb = PictureDecoder.DecodeJpeg(fileStream);
}
How to? Thanks
Your code cannot work since you loaded a png file, but the method beneath accepts jpeg stream. You can do the following>
OpenFile
BitmapImage
WriteableBitmap
from thatBitmapImage
WriteableBitmap
as a jpeg file using the SaveJpeg extension method.