We have a strange issue where an image is changing color when it is being added to a document via 'AppendPicture' or if using the mail marge feature in spire.doc. We are using .net5, so it seems to be using the System.Drawing namespace still, and this issue only happens on linux (Ubuntu 18 I believe) and not on windows.
Here is an example of code we are using to add the image:
- Code: Select all
using var doc = new Document();
var section = doc.AddSection();
var p = section.AddParagraph();
// ms is the image stream
var pic = p.AppendPicture(ms);
I have attached the original image, and a screenshot of how it looks after appending (it goes from orange to blue).
Please note that in our code, we also convert the word document to PDF, so it might be an issue with converting to PDF. However we have noticed that if we use OpenXML to build the word document manually with the same image, and then convert to PDF that we don't get the issue - so this seems to be a problem specifically with the 'AppendPicture' function (and the mail merge feature as well, which I assume uses the AppendPicture internally).
Cheers,
Felix