Hello Aspose,
I have to convert *.ppt, *.pptx, *.odp files to the TIFF format with CCITTFAX3 compression, 1 bit per pixel. I tried this code:
import com.aspose.slides.ImagePixelFormat;
import com.aspose.slides.Presentation;
public class SlidesTest {
public static void main(String[] args) {
Presentation presentation = new Presentation(SlidesTest.class.getResourceAsStream("off6626PptxAttachment.pptx"));
com.aspose.slides.TiffOptions options = new com.aspose.slides.TiffOptions();
options.setPixelFormat(ImagePixelFormat.Format1bppIndexed);
// options.setCompressionType(TiffCompressionTypes.CCITT4);
// Save the presentation to TIFF with specified image size
presentation.save("off6626PptxAttachment.tiff", com.aspose.slides.SaveFormat.Tiff, options);
}
}
It appears to me, that setting the pixel format is ignored because the result is a TIFF with colour. Also, the line with options.setCompressionType(…) causes an exception when activated, complaining that CCITT3 (or 4) requires 1bpp.
Is this a bug or restriction in Aspose or am I doing something wrong?
Environment:
/opt/jdk8/bin/java -version
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Djava.net.preferIPv4Stack=true
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
uname -a
Linux 4.16.8-1-ARCH #1 SMP PREEMPT Wed May 9 11:25:02 UTC 2018 x86_64 GNU/Linux
Thanks for your help!
Regards,
Ottosrc.zip (1.3 MB)off6626PptxAttachment.zip (300.6 KB)