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

Free Support Forum - aspose.com

The picture in excel is seriously distorted after conversion

The picture in excel is seriously distorted after conversion,Is there any solution optimization
in excel:
image.jpg (102.5 KB)
after conversion:
(1)HTML
image.jpg (100.5 KB)
(2)PNG
image.jpg (62.8 KB)
(3)PDF
image.jpg (124.7 KB)

this is my code

Workbook workbook = new Workbook("D://Aspose//EPPR_49454//EPPR_49454.xlsx");
workbook.save("D://Aspose//EPPR_49454//output/EPPR_49454.html",  SaveFormat.HTML);
workbook.save("D://Aspose//EPPR_49454//output/EPPR_49454.pdf",  SaveFormat.PDF);
ImageOrPrintOptions options = new ImageOrPrintOptions();
SheetRender render = new SheetRender(workbook.getWorksheets().get(0), options);
render.toImage(0, "D://Aspose//EPPR_49454//output/EPPR_49454.png");

this is the file
link:https://pan.baidu.com/s/12sDyQPVMA2dol00cMnKt_g
code:y1zh

The resolution of the photos in the original excel file is 5100 * 4300, and the resolution of the pictures obtained after Aspose conversion is 441 * 372. What can be done to solve this problem

@xhaixia,

Thanks for the screenshots to highlight the issue.

When I clicked on your file sharing link, I got an error page. Please upload to some free file sharing service (e.g. dropbox, Google drive, etc.) so that we could seamlessly download resource file(s) without any issue or using any credentials. After getting your file, we will start evaluating your issue or investigate your issue.

Thank you for your reply. The following is the link address of the newly uploaded file

@xhaixia,

Thanks for the template file.

Please notice, I did test your scenario/case using our latest version/fix and found the issue as you mentioned. I found the picture in Excel file is distorted after converting the Excel file to image or PDF, the picture in the output HTML is fine though. I have logged a ticket with an id “CELLSJAVA-44109” for your issue. We will look into it soon.

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

@xhaixia
hi,
The color mode of your picture is CMYK.
The pictures in this mode usually come from SLR cameras or Photoshop software.
The JDK currently does not fully support images in CMYK mode.
Can you convert the picture to RGB mode, and then replace the picture in MS Excel with the converted picture?