#jbig2 — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #jbig2, aggregated by home.social.
-
The lossless data compression fairies are having fun with me today...
- Scan 8.5" x 11" document at 1200dpi @ greyscale
- -> 60 MiB PNG, thank you
- Open PNG in GIMP, select a good threshold point, convert to 1bpp
- -> 514 KiB PNG
- Wait... 116:1 compression from 8-bit PNG to 1-bit PNG? HOW??
- convert to pdf
- "Warning, this file is really huge and may actually be a decompression bomb" lol, ok.
- -> 515 KiB PDF, nice
ocrmypdf foo.pdf document.pdf- -> 194 KiB PDF
- WHAT? HOW?!?
pdfimages -png document.pdf foo- -> 514 KiB PNG
- WHAT IS HAPPENING?!?
#PDF #PNG #Compression #greyscale
P.S., I found out that by default, ocrmypdf uses (lossless) #JBIG2 compression. That's why it was so well compressed. Also, the resultant PNG file at the end (which was basically the same PNG file that went into the PDF) was converted from JBIG —
pdfimagesconverts images, it doesn't extract them in their natively stored format (but a-listwill show you what the native format is). Also, I thinkpdfimages -allwill just export the native format, whatever it is, but I haven't tried that yet. -
The lossless data compression fairies are having fun with me today...
- Scan 8.5" x 11" document at 1200dpi @ greyscale
- -> 60 MiB PNG, thank you
- Open PNG in GIMP, select a good threshold point, convert to 1bpp
- -> 514 KiB PNG
- Wait... 116:1 compression from 8-bit PNG to 1-bit PNG? HOW??
- convert to pdf
- "Warning, this file is really huge and may actually be a decompression bomb" lol, ok.
- -> 515 KiB PDF, nice
ocrmypdf foo.pdf document.pdf- -> 194 KiB PDF
- WHAT? HOW?!?
pdfimages -png document.pdf foo- -> 514 KiB PNG
- WHAT IS HAPPENING?!?
#PDF #PNG #Compression #greyscale
P.S., I found out that by default, ocrmypdf uses (lossless) #JBIG2 compression. That's why it was so well compressed. Also, the resultant PNG file at the end (which was basically the same PNG file that went into the PDF) was converted from JBIG —
pdfimagesconverts images, it doesn't extract them in their natively stored format (but a-listwill show you what the native format is). Also, I thinkpdfimages -allwill just export the native format, whatever it is, but I haven't tried that yet. -
Neat.. encountered the #xerox scanner bug live..
In case you don't remember, their #JBIG2 algorithm setttings causes small scanned symbols to be confused with symbols already in the compression dictionary and then misprinted.
In this case, the superscript "2" and "3" were turned into full size "2" and "3".
The nonsensical result, a #DnD whip does a 1D33 damage 🤣 if only 🤣
-
Neat.. encountered the #xerox scanner bug live..
In case you don't remember, their #JBIG2 algorithm setttings causes small scanned symbols to be confused with symbols already in the compression dictionary and then misprinted.
In this case, the superscript "2" and "3" were turned into full size "2" and "3".
The nonsensical result, a #DnD whip does a 1D33 damage 🤣 if only 🤣
-
Interesting, both the German Federal Office for Information Security and the Swiss Coordination Office for the Permanent Archiving of Electronic Documents advise against the use of #JBIG2 compression in scanned #PDF documents.
This was prompted by the discovery in 2013 of the infamous "swapped characters" bug in Xerox photocopiers:
-
Interesting, both the German Federal Office for Information Security and the Swiss Coordination Office for the Permanent Archiving of Electronic Documents advise against the use of #JBIG2 compression in scanned #PDF documents.
This was prompted by the discovery in 2013 of the infamous "swapped characters" bug in Xerox photocopiers:
-
@barubary @randomgeek Yep. See https://www.theverge.com/2013/8/6/4594482/xerox-copiers-randomly-replacing-numbers-in-documents
Full account of #Xerox copiers mangling numbers here: https://www.dkriesel.com/en/blog/2013/0802_xerox-workcentres_are_switching_written_numbers_when_scanning
They used the #JBIG2 image format’s lossy “pattern matching & substitution” method that substitutes previously-encoded characters if they look enough like the one currently being encoded.
-
Are there any easy-to-use #JBIG2 tools for #Linux?
#GIMP doesn't seem to support it (yet?), and I just can't wrap my head around how to use jbig2enc -- it spits out some data to STDOUT that 'file' can't identify.
I just find the concept of lossy bilevel images compression fascinating, and I'd love to play with it to see how badly it would butcher something like a Floyd-Steinberg dithered image (and how much compression it'd actually accomplish) -
Are there any easy-to-use #JBIG2 tools for #Linux?
#GIMP doesn't seem to support it (yet?), and I just can't wrap my head around how to use jbig2enc -- it spits out some data to STDOUT that 'file' can't identify.
I just find the concept of lossy bilevel images compression fascinating, and I'd love to play with it to see how badly it would butcher something like a Floyd-Steinberg dithered image (and how much compression it'd actually accomplish) -
🤯:
“JBIG2 doesn't have scripting capabilities, but when combined with a vulnerability, it does have the ability to emulate circuits of arbitrary logic gates operating on arbitrary memory. So why not just use that to build your own computer architecture and script that!?” -
This is 🤯:
“A Deep Dive Into An NSO Zero-Click iMessage Exploit: Remote Code Execution”, Project Zero, Google (https://googleprojectzero.blogspot.com/2021/12/a-deep-dive-into-nso-zero-click.html).
On HN: https://news.ycombinator.com/item?id=29568625
#Security #ComputerSecurity #Pegasus #NSOGroup #Apple #iMessage #Exploit #JBIG2