サイズが 144 ピクセルの画像があります (irfanView と Photoshop の両方を使用して画像サイズを測定しました)。
ただし、次の xaml を使用してウィンドウで開いた場合、ActualWidth パラメーターと同じグラフィック ソフトウェアの両方で測定した画像の幅は 192 ピクセルです。
141 ポイント = 192 ピクセル (1pt = 1.33px として) であることがわかります。
したがって、.Netが画像を開き、サイズをピクセル単位で測定し、同じサイズでポイント単位で画像を描画するようです。
コードは次のとおりです。
<Window x:Class="test_image_resizing.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" WindowState="Maximized" Loaded="Window_Loaded">
<Grid>
<Image
x:Name="test"
VerticalAlignment="Top"
HorizontalAlignment="Center"
Stretch="None"
Source="/test%20image%20resizing;component/Resources/Test.png" />
</Grid>
</Window>
private void Window_Loaded(object sender, RoutedEventArgs e)
{
MessageBox.Show("test=" + test.ActualWidth.ToString());
}