Quantcast
Channel: EPPlus Issue Tracker Rss Feed
Viewing all articles
Browse latest Browse all 2262

Commented Unassigned: Changing any row height after inserting picture makes it square [14846]

$
0
0
After inserting picture I change some other row's height. The result is that picture is square. If I comment out row's height change, picture is rectangular as expected.

Image position and size does not have any impact on that issue. It does not have to be positioned in the row with changed height.

```
static void Main(string[] args)
{
var targetPath = Path.Combine(Path.GetTempPath(), Path.ChangeExtension(Path.GetRandomFileName(), ".xlsx"));

using (var package = new ExcelPackage())
{
var worksheet = package.Workbook.Worksheets.Add("new");

var image = new Bitmap(150, 50);
using(var g = Graphics.FromImage(image)) g.FillRectangle(Brushes.Black, 0, 0, 149, 49);

var picture = worksheet.Drawings.AddPicture("Picture", image);
worksheet.Row(1).Height = 5;

package.SaveAs(new FileInfo(targetPath));
}

Process.Start(targetPath);
}
```
Comments: Would be nice if someone could get this in a new nuget version of the package.

Viewing all articles
Browse latest Browse all 2262

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>