Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

Set sheet Font size < 10 cause Picture distortion #30

Open
RyanYANG52 opened this issue Oct 13, 2017 · 0 comments
Open

Set sheet Font size < 10 cause Picture distortion #30

RyanYANG52 opened this issue Oct 13, 2017 · 0 comments

Comments

@RyanYANG52
Copy link

First, thanks for the awesome project.
I try this code with couple different images, all the same result

          using (var p = new ExcelPackage())
            {
                var ws = p.Workbook.Worksheets.Add("1");
                ws.Cells.Style.Font.Size = 9; // set 11 or more, picture will be fine
                var pic = ws.Drawings.AddPicture("1", Image.FromFile("1.jpg"));
                pic.SetSize(50);
                p.SaveAs(new System.IO.FileInfo("1.xlsx"));
            }

ws.Cells.Style.Font.Size = 9; // set 11 or more, picture will be fine

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant