You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Keeping Nuget package the same so as to not break existing users
For my own uses I would like to use PdfSharpCore with my own IImageSource implementation (currently I use a fork without ImageSharp). I think this would also help resolve the various complaints about ImageSharp v3 as someone could create their own package on top of PdfSharpCore.Base including ImageSharp v3 support.
The only implementation issue I see is this direct dependency from XImage -> ImageSharpImageSource:
That could either be replaced with reflection or a separate static helper class (e.g. XImageSharp.FromFile instead of XImage.FromFile). Neither solution is !00% perfect as reflection might not work with trimming and a separate class is obviously a breaking change (though a minor one).
Anyway, if you're open to the idea, I'd be happy to make a PR for this.
The text was updated successfully, but these errors were encountered:
Would you be open to splitting the PdfSharpCore package so that the ImageSharp dependency is decoupled?
For example:
PdfSharpCore.ImageSharp
project that references thePdfSharpCore
projectPdfSharpCore
project ->PdfSharpCore.Base
Nuget packagePdfSharpCore.ImageSharp
project ->PdfSharpCore
Nuget packageFor my own uses I would like to use PdfSharpCore with my own IImageSource implementation (currently I use a fork without ImageSharp). I think this would also help resolve the various complaints about ImageSharp v3 as someone could create their own package on top of
PdfSharpCore.Base
including ImageSharp v3 support.The only implementation issue I see is this direct dependency from XImage -> ImageSharpImageSource:
PdfSharpCore/PdfSharpCore/Drawing/XImage.cs
Line 82 in cdf089b
That could either be replaced with reflection or a separate static helper class (e.g.
XImageSharp.FromFile
instead ofXImage.FromFile
). Neither solution is !00% perfect as reflection might not work with trimming and a separate class is obviously a breaking change (though a minor one).Anyway, if you're open to the idea, I'd be happy to make a PR for this.
The text was updated successfully, but these errors were encountered: