aspose-cells / Aspose.Cells-for-Java

Aspose.Cells for Java examples, plugins and showcases
https://products.aspose.com/cells/java
MIT License
148 stars 102 forks source link

TIFF conversion is broken #45

Closed tmhung88 closed 4 years ago

tmhung88 commented 4 years ago

I ran several examples of Excel-TIFF conversion and all outputs were corrupted.

OS: Mac Catalina 10.15.3 JDK: OpenJDK 11.0.1

image

output_tiff.zip

amjad-sahi commented 4 years ago

@tmhung88 ,

You need to download JAI libraries and add them to classpath/project. Please note, to convert spreadsheet to TIFF image(s) you should have JAI libraries to be set in your classpath or project.

If you still find the issue (after installing JAI libraries), please share your sample code (runnable) with sample source files, we will check it soon.

tmhung88 commented 4 years ago

@amjad-sahi I'd like to point out that this repo does include JAI library https://github.com/aspose-cells/Aspose.Cells-for-Java/tree/master/Examples/libs. However, there are missing other JAI packages that are required for color processing. I hope that we include complete JAI packages into the example so that people don't have to look around for them.

// settings
options.setTiffColorDepth(com.aspose.cells.ColorDepth.FORMAT_8_BPP);

// stacktrace 
javax/media/jai/ColorCube
java.lang.NoClassDefFoundError: javax/media/jai/ColorCube
    at com.aspose.cells.zakx.a(Unknown Source)
    at com.aspose.cells.zakx.b(Unknown Source)
    at com.aspose.cells.zpk.a(Unknown Source)
    at com.aspose.cells.zcil.a(Unknown Source)
    at com.aspose.cells.WorkbookRender.toImage(Unknown Source)
amjad-sahi commented 4 years ago

@tmhung88,

Thanks for pointing it out.

We will update the JAI libraries and other jars in the folder @ Github repos. soon. In the mean time, please do use the attached zipped archive for JAI libraries and other Jar, your issue should be fixed in it.

tmhung88 commented 4 years ago

@amjad-sahi I'm able to fix all issues with the set of libraries you provided. Thanks a lot!

amjad-sahi commented 4 years ago

you are welcome.

amjad-sahi commented 4 years ago

Moreover, we have now updated the libraries in the specified examples folder @Github repos.