Hi!
I needed to resize an image so I used following code:
Any ideas for what can be wrong here?
I needed to resize an image so I used following code:
WriteableBitmap img2 = new WriteableBitmap((int)width, (int)height);
img2 = img.Resize((int)width, (int)height, WriteableBitmapExtensions.Interpolation.Bilinear);
destination.Blit(new Rect(coords.X, coords.Y, img2.PixelWidth, img2.PixelHeight), img2, new Rect(0,0, img2.PixelWidth, img2.PixelHeight));
return destination;
But when i save this destination image it becomes distorted around the edges and gives me this image:Any ideas for what can be wrong here?