Client is asking to put a logo in their report and they are requesting the image size be at 0.5" height and 0.68" width.
Using the following code:
Worksheet Worksheet = Workbook.Worksheets[WorksheetTitle];
picture = Worksheet.Pictures.Add(left, top, filepath, widthScale, heightScale);
if (offset) {
Aspose.Cells.Drawing.Picture opicture = Worksheet.Pictures[picture];
opicture.Left = offsetLeft;
opicture.Top = offsetTop;
opicture.IsLockAspectRatio = false;
opicture.IsAutoSize= false;
opicture.WidthInch = (double)0.68;
opicture.HeightInch = (double)0.50;
}
And what I get back almost works. The image in the Excel sheet gets the width of 0.68 but the height is 0.65 and the scale height is 42%/width 33% when I pass in 45% in widthScale and heightScale to the method.
Is there an automatic scaling occurring or do I need to set the image scaling in a particular order?