Open aesalazar opened 5 years ago
Thanks for your detailed description. I have fixed the underlaying problem in EPPlus version 5. I could sadly not use the PR, but the functionality is the same. In version 5 I have rewritten the image handling with a package common picture store.
When inserting the vector-based image formats WMF or EMF, EPPlus will store the images as PNGs. This is because at some point a call is made to
Image.Save()
which uses availableImageFormat
's in the GDI. These do NOT include WMF or EMF soImage.Save()
falls back to using the one for PNG.The end result would be pixelation when stretched inside excel as well as a larger file size. Running this in
DrawingTests.cs
:Gives this result:
The GUID listed is for PNG. To fix, the existing
FileStream
should be used.Here is a PR with the proposed changes which will allow the 7 new tests (including the one above) to pass: #490