Picture quality not same on different Spreadsheet editors

Noticed that on a .xlsx developed report the picture quality differs from one spreadsheet editor to others (See attached screen shotPicture quality not same on different Spreadsheet editors.PNG (112.6 KB)
). The pictures format is .jpg.
On M.Excel is displaying fine, but on the rest of spreadsheet editors tested, as LibreOffice, OpenOffice and Google Sheets the picture displays poor quality (pixelated).
Just followed the documentation from: Managing Pictures|Documentation for inserting picture in cell:
int pictureIndex = worksheet.Pictures.Add(cell.Row, cell.Column, pathToTemp + sStick);
Aspose.Cells.Drawing.Picture picture = worksheet.Pictures[pictureIndex];
// Set width, height
picture.Width = 95; picture.Height = 95;

@Remus87,

I could not spot any significant difference regarding quality in your provided screenshot. Also, could you insert your JPG picture (set width and height as per your code) into the sheet in MS Excel manually and save the file. Now use other spreadsheet editors to check if the quality deteriorated or not. If you find other editors do not show the picture quality issue, kindly do provide your picture, sample code (runnable) and sample Excel files (input file and output file, etc.). We will check your issue soon.

I attach the same pic with rectangles signalling the pics (Conflict rowPicture quality not same on different Spreadsheet editors (1).PNG (112.1 KB)
) . If you still can’t spot it please apply a zoom on the screen shot provided.
I inserted manually as you advised the JPG into into M Excel and tried with different spreadsheet editors and the picture is not losing from quality (just a very insignificant bit)
You may find yourself that if replicate the simple scenario from: Managing Pictures|Documentation within a console app and modify the width and length of the cell where insert the pic (just so clearly visualize the differences) and run the workbook with different spreadsheet editors you should be able to reproduce the issue. If you couldn’t reproduce it let me know and will try to prepare a console application with excel files…

Did you also set picture’s width and height (as per your code) while inserting it in the sheet in MS Excel (manually)?

i dragged the corners of the picture so it can fit into the cell

@Remus87,

We will evaluate your issue thoroughly soon. But could you please comment out the line of code, so it should not be scaled, then check if you still find picture quality issue on other editors.

Hi Amjad!
Just tried that. By keeping original picture size (not fixed size or scaling) the quality is the same on all editors (good).
Once we set the size for the picture it start affecting the quality on other editors. Tried both:
picture.WidthScale = 5; picture.HeightScale = 12;
picture.Width = 95; picture.Height = 95;
but neither of them provided a fix for that.
Documented with screen shots in the attached file.Fix AccsMap Stick report image quality.docx (276.1 KB)

@Remus87,

Could you please zip and attached the output Excel file (with inserted picture). We will log approprite ticket for investigation after evaluation.

PS. please try our latest version/fix:
Aspose.Cells21.12.6 For .Net2_AuthenticodeSigned.Zip (5.6 MB)
Aspose.Cells21.12.6 For .Net4.0.Zip (5.6 MB)
Aspose.Cells21.12.6 For .NetStandard20.Zip (5.6 MB)

StickRep.zip (765.6 KB)

Please find attached the output Excel file.

@Remus87,

After an initial test, I noticed the issue. If we simply open your output Excel file on other editors other than MS Excel, the picture quality is not good. I have logged a ticket with an id “CELLSNET-50198” for your issue. We will investigate and look into it soon.

Once we have an update on it, we will let you know.

@Remus87,

We evaluated your issue in details. It’s not the issue of Aspose.Cells. The ratio of the picture size is too small, so pictures display differently on different platforms. It is better that you can update your picture to the desired size or use vector images.

Ok I see.
If that’s the case, then why M. Excel is keeping the clarity of pictures than? Wouldn’t that be good that Aspose.Cells can replicate the architecture of it so it overcomes the issue?

@Remus87,

We think this is the limitation or behavior of editors (other than MS Excel) that show pictures with deteriorated quality. You may perform the task manually and you will get same results on other editors.

Ok. Thank you!

@Remus87,

You are welcome.