I have this image (original size: 256x256)
I made this xaml definition to show the image in my application
<Image Grid.Row="1" Source="/MyProject;component/Images/happy.png" Stretch="Fill" Width="64" Height="64" VerticalAlignment="Top" Margin="0,0,0,0" HorizontalAlignment="Center" />
And I get this result
How can I made a more smooth resize?
If you want to resize an image without losing quality, you need to make sure that the "Resample" checkbox is unchecked. This checkbox tells Paint to change the number of pixels in the image. When you uncheck this box, Paint will not change the number of pixels, and the quality of the image will not be reduced.
The most common side effect of scaling an image larger than its original dimensions is that the image may appear to be very fuzzy or pixelated. Scaling images smaller than the original dimensions does not affect quality as much, but can have other side effects.
Open the image whose properties you want to change. In the Width and Height boxes in the Properties window, type the dimensions that you want. If you're increasing the size of the image, the Image Editor extends the image to the right, downward, or both, and fills the new region with the current background color.
Include RenderOptions.BitmapScalingMode="Fant"
on your Image, like so:
<Image Grid.Row="1" Source="/MyProject;component/Images/happy.png" RenderOptions.BitmapScalingMode="Fant" Stretch="Fill" Width="64" Height="64" VerticalAlignment="Top" Margin="0,0,0,0" HorizontalAlignment="Center" />
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