På lørdag 28. november 2026 kl. 11:58, skrev Marc Espie:

> Noticed a warning while using ocrmypdf, and investigated.
>
> Turns out ocrmypdf can work in tandem with jbig2enc to compress
> parts of the scanned pdf using the text info it gathered.
>
> The results are fairly pleasant:I passed a full scanned book thru
> orcmypdf.
>
> Results:
> 12082012 bytes without jbig2enc
> 10059811 bytes with jbig2enc
>
> with no visible degradation, as far as I can see.
>
> Port is decently trivial, there's just a small patch, because
> meson might try to build giflib is not already there, and it
> auto-detects using a pkgconfig file we don't have, but I've
> checked: giflib is only brought in thru leptonica and there's
> zero mention of giflib artifacts anywhere in the code.
>
> Requires C++17, hence the COMPILER line, but I doubt it will
> be of much use on older architectures anyway.
>
> ocrmypdf picks it up automatically if it's installed, with no
> need to do anything.
>
> The PATENTS file is there just as a safeguard. Reading the Annex I
> of fcd14492.pdf, the most recent patent referenced was filed in 1997.
> So it expired a few years ago.
>
> Port is attached
>

Current/amd64. No nits I could find. Regression test passed. Checks:

jbig2enc-0.32(graphics/jbig2enc):
Extra:  pthread.28
--

$ jbig2 --version
jbig2enc 0.32
 leptonica-1.87.0
  libgif 6.1.3 : libjpeg 6b (libjpeg-turbo 3.2.1) : libpng 1.6.59 : libtiff 
4.7.2 : zlib 1.4 : libwebp 1.6.0 : libopenjp2 2.5.4
--
yaydn

Think this is ports ready? Hope this helps and happy hacking, or
scanning in this case.

Reply via email to