im trying to make a window which contain "browse" button to load image file and a button "+" to zoom in the image. Browse button and its open dialog successfully loads the image into Image aka . When I press "+" button, it doesnot zoom in the loaded image but blurs it. Whats wrong?
The original loaded image is named as OriginalSizedImage. The zoomedIn image is named as
private void ZoomInButton_Click(object sender, RoutedEventArgs e)
{
BitmapImage newZoomedInImage = new BitmapImage();
newZoomedInImage.BeginInit();
newZoomedInImage.DecodePixelWidth = originalSizedImage.DecodePixelWidth + 20 ;
newZoomedInImage.DecodePixelHeight = originalSizedImage.DecodePixelHeight + 20;
newZoomedInImage.UriSource = originalSizedImage.UriSource;
newZoomedInImage.EndInit();
imageView.Source = newZoomedInImage ;
}