Image clarity issue in excel oleObject in Slides for pptx**** WorkStopper ***** Immediate Attention is needed *********

Hi,


Thank you for using Aspose.Cells.

Please share with us your sample application to reproduce the issue at our end. We will look into it and assist you further.

Also, we recommend you to download and use this LATEST version of Aspose.Cells in your applications.

Hi Kashif,

Thanks for your response.

Please find the attached sample application.

Regards,

Laxmikanta

Hi,

Thanks for your sample project files and using Aspose components.

We will soon look into your issue and update you asap.

Hi,

Thanks for your project files.

I was notice the issue using your project with the latest version:

Aspose.Cells for .NET 7.3.0


Below is a screenshot for a reference.

We have logged this issue in our database. We will look into it and fix the problem. Once the issue is fixed or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSNET-40853.

Screenshot:

Hi,

Thanks for using Aspose.Cells.

Please download and try this fix: Aspose.Cells for .NET v7.3.0.2

Please insert the Emf format chart into OleObjectFrameEx.

C#


using (MemoryStream msChart = new MemoryStream())

{

if (msChart.Length > 0)

{

Aspose.Cells.Rendering.ImageOrPrintOptions op = new Aspose.Cells.Rendering.ImageOrPrintOptions();

op.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;

chartSheet.Charts[0].ToImage(msChart, op);

objFrameEx.Image = presEx.Images.AddImage(msChart);

}


}

Hi,

By applying your code we are not getting the excepted image quality. The output image is not that much rich as the OLE engine’s output.

Please refer the attachment for more details.

Thanks,
Laxmikanta

Hi,

Thanks for your posting and using Aspose.Cells for .NET.

Please download and try the latest version:
Aspose.Cells
for .NET v7.3.1.1
.It should fix the image quality issues.

Let us know your feedback.

Hi,

I have tried with your updated dll. But I found no improvement in the image clarity.

If I am writing
OleObjectFrameEx.SubstituteImagePictureFillFormat.Picture.Image = presEx.Images.AddImage((System.Drawing.Image)chartSheet.Charts[0].ToImage());

Than image is faded.

if I am writing
using (MemoryStream msImage = new MemoryStream())
{
Aspose.Cells.Rendering.ImageOrPrintOptions op = new Aspose.Cells.Rendering.ImageOrPrintOptions();
op.ImageFormat = System.Drawing.Imaging.ImageFormat.Emf;
chartSheet.Charts[0].ToImage(msImage, op);
objFrameEx.SubstituteImagePictureFillFormat.Picture.Image = presEx.Images.AddImage(msImage);
}

Than the image is not rich.
Find the both output.

Thanks,
Laxmikanta

Hi,

It seems, Aspose taken images are more darker than Ms-Excel images. Aslo, Ms-Excel images looks blurry.

If you see any problem, then please provide us your comparison report. We will then look into this issue and try to fix them.

The darker image, which is generated by the emf format is not looking rich. So we are not going to use that. But normal aspose output is blurred but is looking reach. Please look 397176 post for more details.

Thanks,
Laxmikanta

Hi,

We need the source excel file for looking into this issue, what’s the matter. I think we may check your issue by the following steps.

1 - Only save the chart to image, then compare the generated image to the excel chart. If it is not proper, we can confirm Aspose have bug in converting to image process.

2 - If 1 is right, check whether inserting emf format image to ppt works fine.

3 - If 2 is right too, make the chart in proportion and insert it into OleObjectFrameEx. E.g. the chart size is (100, 50) and the scale is 0.5, the OleObjectFrmaeEx size must be (50, 25), else the image will be distorted.

Hi,

Please find the attached sample application, where I generated the excel file with chart and the image is generating from the chart of the excel file. The excel output is looks good, but the issue with the generated image only.

If possible please let me know the updated code snippet where I can get the proper image output(same as the OLE engine generating).

And I am trying to set the SeriesLine weight by “chartObj.NSeries[i].Border.WeightPt = 2;”. After using this the excel output is looking good but in the image, all the series lines are coming black color only.

Thanks
Laxmikanta

Hello, Since more than 24 hours over, may I know the status of this issue ???

Hi,

Thanks for your posting and using Aspose.Cells for .NET

This is a difficult issue and it will take some time to be sorted out fully, probably a week or two.

If it could be fixed earlier, we will update you soon

Anyway, I have logged your comments in our database against the issue id: CELLSNET-40853

We will keep you updated.

Hi,

Thanks for using Aspose.Cells.

Please try the following code segment for a better result. We are still looking into the series color coming to black issues.

C#


//Aplies same scale to the objFrame object.

float xScale = objFrameEx.Width / imgChart.Width;

float yScale = objFrameEx.Height / imgChart.Height;

float scale = xScale;


if (yScale < scale)

scale = yScale;


objFrameEx.Width = imgChart.Width * scale;

objFrameEx.Height = imgChart.Height * scale;


//Prevents the chart image to be distorted when changes the display size of PowerPoint.

Stream msEmfChart = new MemoryStream();

wbObj.Worksheets[chartSheetIdx].Charts[0].ToImage(msEmfChart, System.Drawing.Imaging.ImageFormat.Emf);


objFrameEx.SubstituteImagePictureFillFormat.Picture.Image = presEx.Images.AddImage((System.Drawing.Image)imgChart);

///objFrameEx.SubstituteImagePictureFillFormat.Picture.Image = presEx.Images.AddImage(msEmfChart);


Hi,

Also, Please download and try this fix: Aspose.Cells for .NET v7.3.1.2.

We fixed the setting width of line.

Hi,
I have followed your code. But no changes in the output. If a slide having more charts like 9 charts, the slide is not looking good. As this is most important issue for out client deliverable.

If possible please send me a sample application.

Thanks,
Laxmikanta

Hi,


We fix the line width issue in the previous fix we provided to you.

We have logged your feedback to attach it with your existing issue “CELLSNET-40853”. Our concerned developer will look into it and advise you appropriately.

Also, we appreciate if you could create a sample project to show the issue(“If a slide having more charts like 9 charts, the slide is not looking good”), it will help us to analyze the issue more accurately.



Thank you.

May I know the status of the <CELLSNET-40853.

Hi,


We request you to create a sample project to show the issue(“If a slide having more charts like 9 charts, the slide is not looking good”), it will help us to analyze the issue accurately and we can look into your issue further.

Also, please try our latest version v7.3.4:
http://www.aspose.com/community/files/51/.net-components/aspose.cells-for-.net/entry427232.aspx

Thank you.