Image color is changed after MHTML to TIFF using C#

Hi Team ,

Currently we are using aspose version 13.9.0.0 for converting the documents (email,word,pdf etc) to tiff .Currently it is converting in black and white ,however we would need to convert the colour email to colour tiff .Is there anyway we can acheive this with current version.
Below is the code snippet

string FullconvertedMultiTiffName = string.Empty;
//MailMessageLoadOptions msgopt = new MailMessageLoadOptions();
// load the MSG file using Aspose.Network for .NET
msg = MailMessage.Load(FullInputFileName, MessageFormat.Msg);
// msg = MailMessage.Load(FullInputFileName, msgopt);

            msgStream = new MemoryStream();
           
            msg.Save(msgStream, MailMessageSaveType.MHtmlFromat);
           
            FullconvertedMultiTiffName = Path.Combine(OutputFolder, "MSGFile.tiff");
            msgStream.Position = 0;
            // load the MHTML stream using Aspose.Words for .NET
            LoadOptions opt = new LoadOptions();
            opt.LoadFormat = LoadFormat.Mhtml;
            msgDocument = new Document(msgStream);
            foreach (Shape shape in msgDocument.GetChildNodes(NodeType.Shape, true))
            {

                ResizeLargeImage(shape);

            }

           //TiffOptions tiffoptions = new TiffOptions(TiffExpectedFormat.Default);
            
            ImageSaveOptions options = new ImageSaveOptions(Aspose.Words.SaveFormat.Tiff);
           // options.ImageColorMode = ImageColorMode.BlackAndWhite;
            options.ImageColorMode = ImageColorMode.None;
            options.PageIndex = 0;
            
            options.Resolution = 200;
            options.PageCount = msgDocument.PageCount;
            options.ImageBrightness = .40f;
            options.TiffCompression = TiffCompression.None;
            msgDocument.Save((Path.Combine(OutputFolder, "MSGFile.tiff")), options);
            return FullconvertedMultiTiffName;

@anishvj

Could you please ZIP and attach your .msg file along with .mhtml file generated by Aspose.Email? We will investigate the issue and provide you more information on your query.

ColorChecking.zip (24.2 KB)
pls find attachment

Version Aspose.Email=4.1.0.0
Aspose.Word=13.9.0.0

@anishvj

We have tested the scenario using the latest version of Aspose.Email for .NET 20.2.0 and Aspose.Words for .NET 20.3 with the following code example. We have not found any issue with output TIFF file.

Aspose.Email.MailMessage.Load(MyDir + "E20200304000015.msg").Save(MyDir + "input.mhtml");

Document document = new Document(MyDir + "input.mhtml");

ImageSaveOptions options = new ImageSaveOptions(Aspose.Words.SaveFormat.Tiff);
options.ImageColorMode = ImageColorMode.None;
options.PageIndex = 0;

options.Resolution = 200;
options.PageCount = document.PageCount;
options.ImageBrightness = .40f;
options.TiffCompression = TiffCompression.None;
document.Save(MyDir + "out.tiff", options);

Could you please ZIP and attach your problematic and expected output TIFF files? Please also create a standalone console application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing. We will investigate this issue and provide you more information on it.

I wanted to check if I can convert the colour email to colur tiff in version Aspose.Email =4.1.0.0 and Aspose.Word=13.9.0.0

@anishvj

Please note that we do not provide support for older released versions of Aspose APIs. Moreover, we do not provide any fixes or patches for old versions of Aspose products either. All fixes and new features are always added into new versions of our products.

We always encourage our customers to use the latest version of Aspose products as it contains newly introduced features, enhancements and fixes to the issues that were reported earlier.