We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

CMJN images : background is different after generation

Hello,


We have a problem with cmjn images.
The background color is not the same after the generation.
I attach all files for examples.
The image has a red background and after generation, it appears blue (in word and pdf documents).

We use the last version of Aspose.Words 14.12.0 (.net) with Mono (version 2.10.8.1 on Debian 2.10.8.1-8).

Can you help us with this please ?

Regards.

Hi Edwige,


Thanks for your inquiry. The input Word document “Fiche commerciale vente appartement sans pièces (1).doc” you attached does indeed contain an image with blue background (please see attached screenshot which was taken from MS Word 2013). So, this is expected behavior. If we can help you with anything else, please feel free to ask.

Moreover, I used the code from this article for teseting this scenario.

Best regards,

Hello,


Sorry, it was not very clear. The document was generated with a mailmerge (execute mail merge with region).

The image we inserted was the one called cmjn.jpg (with an Image Merge Field using a callback which implements IFieldMergingCallback).
The image has a red backgroud but once it is inserted, it has a blue background.

Regards.

Hi Edwige,


Thanks for the additional information. Please attach your input template Word document here for testing. Also, it would be great if you please create a standalone runnable console application (source code) that helps us reproduce your problem on our end and attach it here for testing. As soon as you get this simple application ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

Best regards,

Hello,


Yes, please find attached a test project (there is a lot of useless things in it but the issue is here).

Regards.

Hi Edwige,


Thanks for the additional information. We are working over your query and will get back to you soon.

Best regards,

Hi Edwige,


Thanks for being patient. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-11426. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

Hello,


Ok, thanks for your reply.
I will wait for the correction.

Regards.
Hi Edwige,

Regarding WORDSNET-11426, our product team has completed the work on your issue and has come to a conclusion that this issue and the undesired behaviour you're observing is actually not a bug in Aspose.Words. So, we have closed this issue as 'Not a Bug'.

The issue is not reproducible on Windows. As far as we can see from the code the problem image (in CMYK color model) first is loaded into Bitmap and then inserted into document. GDI+ converts CMYK images to RGB format on loading. We don't know how Mono framework works in such case, but should do the same. The problem is definitely in Mono code since the simple code like the following changes the image background:

Bitmap bmp = new Bitmap("X:/cmjn.jpg");
bmp.Save("X:/testbug.jpg");


So Aspose.Words receives already corrupted image. I am afraid, we're also unable to find any workaround for this issue.

Best regards,