geer0Eec
  • Joined on
Loading Heatmap…

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

> As a separate matter, I believe a useful complement to support in img2pdf might be a utility to merge the "stripped form" as stored in PDF back into an actual JBIG2 file, similar to the…

6 months ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

> So now the only remaining piece we need is some way to identify the file as JBIG2. Any ideas? This seems quite impossible, which is a job of `pdfimages`. I don't know whether they are…

3 years ago

geer0Eec reopened issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

3 years ago

geer0Eec closed issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

> > It is then natural to select some of them to assemble another pdf file. > > Unless you need to edit the images, it might be easiest to work with the PDF document and a tool like pdftk or…

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

Oh, I see, it is not lossless - `JBIG2` has only 1 bit per pixel, while the original `JPEG` has 8 bits per pixel.

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

> But why do you insist on using jbig2enc in the first place? I cannot find any bilevel image where using jbig2 leads to any significant space reduction compared to the compression that img2pdf uses…

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

> Okay, I obtained a PDF containing a JBIG2 encoded image. This is becoming more troublesome... Instead of just containing one blob per image, the PDF contains two blobs for each image. One is the…

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

> The next issue: with jbig2enc not being present in Linux distros and being encumbered by patents and no JBIG2 support in imagemagick or PIL, I cannot add any testcases for JBIG2 support to the…

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

I did some test and seemingly the size data `(height, weight, xppi, yppi)` is contained in the JBIG2 stream (not the head). I pass the JBIG2 stream generated by `pdfimages` to the code…

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

Thanks for the explanations. However, it seems to me that [this answer](https://stackoverflow.com/a/27713306) claims that there are "header" and "tail" in a "normal" JBIG2 file which are "stripped"…

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

Maybe I misunderstood something. In the manpage of `pdfimages`, the "formats" `JPEG`, `JPEG2000`, `JBIG2` and `CCITT` are listed in parallel, and I think that if I specify `-png`, it would induce a…

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

Thanks. Let me first open a feature request at `pdfimages`. However, it seems to me that neither are the real `JBIG2` images supported by `img2pdf`?

3 years ago

geer0Eec commented on issue josch/img2pdf#112

Support for JBIG2 images ~~/ streams~~

The `pdf` that I am dealing with is not permitted to share (which however consists of many scanned pages), but the result of `pdfimages -list` looks like ``` page num type width height color…

3 years ago

geer0Eec opened issue josch/img2pdf#112

Support for JBIG2 images / streams

3 years ago