geer0Eec
  • Joined on 2021-07-29
geer0Eec commented on issue josch/img2pdf#112 2023-11-29 15:35:27 +00:00
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…

geer0Eec commented on issue josch/img2pdf#112 2021-07-30 20:34:26 +00:00
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…

geer0Eec reopened issue josch/img2pdf#112 2021-07-30 17:20:54 +00:00
Support for JBIG2 images ~~/ streams~~
geer0Eec closed issue josch/img2pdf#112 2021-07-30 17:20:21 +00:00
Support for JBIG2 images ~~/ streams~~
geer0Eec commented on issue josch/img2pdf#112 2021-07-30 17:19:59 +00:00
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…

geer0Eec commented on issue josch/img2pdf#112 2021-07-30 16:20:19 +00:00
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.

geer0Eec commented on issue josch/img2pdf#112 2021-07-30 15:37:46 +00:00
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…

geer0Eec commented on issue josch/img2pdf#112 2021-07-30 15:32:28 +00:00
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…

geer0Eec commented on issue josch/img2pdf#112 2021-07-30 14:30:01 +00:00
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…

geer0Eec commented on issue josch/img2pdf#112 2021-07-29 22:12:06 +00:00
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…

geer0Eec commented on issue josch/img2pdf#112 2021-07-29 21:12:03 +00:00
Support for JBIG2 images ~~/ streams~~

Thanks for the explanations. However, it seems to me that this answer claims that there are "header" and "tail" in a "normal" JBIG2 file which are "stripped"…

geer0Eec commented on issue josch/img2pdf#112 2021-07-29 20:19:12 +00:00
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…

geer0Eec commented on issue josch/img2pdf#112 2021-07-29 20:06:56 +00:00
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?

geer0Eec commented on issue josch/img2pdf#112 2021-07-29 19:26:14 +00:00
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…
geer0Eec opened issue josch/img2pdf#112 2021-07-29 18:30:00 +00:00
Support for JBIG2 images / streams