为什么粘贴到 Excel 时图像显示的尺寸比实际尺寸大,我怎样才能让它以自然尺寸显示?

Why does an image display at greater that its actual size when pasting into Excel, and how can I get it to display at its natural size?

我有这段代码可以将图像粘贴到 Excel:

. . .
string unitImageLoc = GetUnitImageLoc();
if (unitImageLoc != "image not found")
{
    Image img = Image.FromFile(unitImageLoc);
    int imgWidth = img.Width;
    int imgHeight = img.Height;
    _xlSheet.Shapes.AddPicture(unitImageLoc, 
Microsoft.Office.Core.MsoTriState.msoFalse, 
Microsoft.Office.Core.MsoTriState.msoCTrue, 4, 4, imgWidth, imgHeight); 
}

private string GetUnitImageLoc()
{
    string unitUpper = _unit.ToUpper();
    string candidateFile = string.Format("C:\RoboReporter\{0}.png", 
unitUpper);
    if (File.Exists(candidateFile))
    {
        return candidateFile;
    }
    return "image not found";
}

有效,但打印出的图像大于其实际尺寸,如此处所示(Excel 在顶部,在图像查看器中显示在底部):

这不是特定图像的问题:它发生在任何图像中:

所以我是否需要将宽度和高度乘以 70% 或其他值才能使其相同?

尝试为 widthheight 输入 -1,如前所述 here