Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I was curious to see how JBIG2 fares compared to JPEG, and found a benchmark from 2010 [1] comparing the file size of the resulting PDF:

  convert *.jpg JPEG.pdf -- 43777 kb
  convert *.png PNG.pdf -- 6907 kb
  jbig2 -b J -d -p -s *.jpg; pdf.py J > JBIG2.pdf -- 947 kb
  jbig2 -b J -d -p -s -2 *.jpg; pdf.py J > 2xJBIG2.pdf -- 1451 kb
Quite a difference. I don't quite understand how JPEG fares so poorly compared to (lossless) PNG, maybe because it doesn't do monochrome?

[1] http://ssdigit.nothingisreal.com/2010/03/pdfs-jpeg-vs-png-vs...



JPEG is optimized for photographic images with lots of smooth gradients. It does badly with sharp edges, which scanned documents tend to contain a lot of.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: