nissl-lab / npoi

a .NET library that can read/write Office formats without Microsoft Office installed. No COM+, no interop.
Apache License 2.0
5.74k stars 1.44k forks source link

Wrong picture size in merged cell after picture.Resize() was invoked. #1393

Open JackyLi918 opened 4 months ago

JackyLi918 commented 4 months ago

NPOI Version

2.5.6 and 2.7.1

File Type

Upload the Excel File

Please attach your original Excel File to help us reproduce the issue

Reproduce Steps

Issue Description

EXCEL 2007, in a merged cell ( example col 2 to col 5), I put 5 pictures with size 76 * 76px, and call Resize() to make the picture is displayed as original size. but from the 3rd picture, it has wrong width, becaue it is cross the col2 and col3, the dx2 of anchor looks not right. check the width in Excel app, the original size is right, but the scaleY is greater than 100%.

image

the above issue is occured on V2.5.6.

on 2.7.1 all prctures are removed after Resized() called.