unidoc / unipdf

Golang PDF library for creating and processing PDF files (pure go)
https://unidoc.io
Other
2.61k stars 254 forks source link

Compress: Encode binary images as CCITTFaxDecode #52

Open gunnsth opened 5 years ago

gunnsth commented 5 years ago

The CCITTFaxDecode filter (and JBIG2 which is under development) is particularly well suited for encoding binary images (0/1). Images for optimization that are binary (DeviceGray and/or BitsPerComponent 1) should be encoded with CCITTFaxDecode filter.

jasonlor commented 5 years ago

XObject Image: R8 Error: CCITTFaxDecode encoding is not yet implemented

+1 also seeing this, is there a timeline for CCITTFaxDecode encoding support?

Thanks!

gunnsth commented 5 years ago

What version of unipdf are you using? CCITTFaxDecode is supported for both decoding and encoding since v3.0.0.

jasonlor commented 5 years ago

I was using an older version defined by the examples on the website.

https://unidoc.io/examples/image/extract_images

gunnsth commented 5 years ago

@jasonlor Unfortunately the examples section on the website is obsolete. We are working on a site refresh. Our GitHub examples repository is up to date: https://github.com/unidoc/unipdf-examples

jasonlor commented 5 years ago

Thanks!