How I can resize an image in windows phone without losing its quality. I tried the below given method but the quality of the image fades in a fair margin. Can anyone update a better method for resizing my image.
btmMap = new WriteableBitmap(biInput);
var source = WriteableBitmapContextExtensions.GetBitmapContext(btmMap);
btmMap = WriteableBitmapExtensions.Resize(btmMap, (int)imgWidth, (int)imgHeight, WriteableBitmapExtensions.Interpolation.Bilinear);
I also tried this method but the result is same :
var wbOutput = PictureDecoder.DecodeJpeg(biInput, (int)imgWidth, (int)imgHeight);
wbOutput.SaveJpeg(ms, wbOutput.PixelWidth, wbOutput.PixelHeight, 0, 100);
ms.Seek(0, SeekOrigin.Begin);
bmp.SetSource(ms);
ms.FlushAsync();
Download, reference and use 6.5 KB DLL from here for bicubic resizing. It produces better result than bilinear method in WriteableBitmapExtensions.
P.S. Excellent question! I've just updated my app to use better resizing method for generating images for my live tile.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With