fix drawing image in rendering excel/word report in linux
I fix an issue in rendering rdlc containing image in linux systems.
ImageSharp has a license incompatible with Report Viewer - I can't add this dependency.
Hi @lkosson
I want to use your library in Linux/Docker, but I understand your concern about merging this PR.
Can we modify this library to make the renderer part configurable so the user can image ImageSharp or whatever?
OR can we use Aspose.Drawing instead?
As far as I'm concerned, you can fork and modify this library as you wish. Just keep in mind that original Report Viewer (on which this project is based) is still owned and licensed by Microsoft.
@lkosson that is fine, but still it would be great for this library to handle Linux rendering well. Maybe using SkiaSharp would be good enough as it is MIT license?
For this particular case, I guess the best resolution would be to just parse jpg/png/gif/bmp header to extract image width and height directly from bytestream. Shouldn't be more than 100 LoC extra and wouldn't need to pull whole image processing library along with it's native components just to read basic metadata.
@lkosson You are right for this case, but i would expect to change whole System.Drawing with SkiaSharp in order to have full Linux compatibility.
.docx renderer don't seem to use System.Drawing for anything else than determining image dimensions. Full Linux compatibility for other renderers (including PDF) is hopeless. Text layout is done using UniScribe, which has no open/free/cross-platform equivalents. Also various parts of renderers depend on GDI, with all its quirks and bugs.
The only way I can think of is to completely rewrite a renderer to output PDF using SkiaSharp. I estimate it would take a good half of the year to get some output and another half to make it look at least similar to current PDF renderer. While that sounds like a lot of fun, I can't afford to focus full-time only on this project.