Hi,
I am generating HTML from a .DOCX file which does have a TIF file embedded. This TIF does have 4 channels (RGB + Alpha).
When saving as SaveFormat.HTML_FIXED the alpha channel is not considered (and the resulting document looks bad). However when saving as SaveFormat.HTML the alpha channel is taken into account and the document is fine. Seems to be due to the first way converting TIF to JPG and the second approach converting TIF to PNG.
That looks like a bug or is there some kind of way to push aspose.words to respect transparency or generate differently formatted images during generation?
package org.example;
import com.aspose.words.Document;
import com.aspose.words.SaveFormat;
public class Main {
public static void main(String[] args) throws Exception {
Document document = new Document("path\\to\\docx.docx");
String outputPathHTML = "path\\to\\html.html";
String outputPathHTMLFixed = "path\\to\\htmlFixed.html";
// Produces a good output with images in png format
document.save(outputPathHTML, SaveFormat.HTML);
// Produces a messed up output with images in jpeg format
document.save(outputPathHTMLFixed, SaveFormat.HTML_FIXED);
}
}