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

beautiful! I had this file sitting on my desktop in compressed JPEG format. Text JPEGs are inherently bad and spit out ugly pics:

Original - 327kb - http://i.imgur.com/DTxTcLp.jpg

MozJPEG - 127kb - http://i.imgur.com/jVESWGS.jpg

Stared at both side by side and really struggled to tell the difference. Great job!

Sorry WebP is great but I just don't see it getting adapted unless all browsers get on board as well as big software. JPEG is practically a household name, photographers, artists, insta-grammers,all know what it is and short of a mild revolution I just don't see it.



How can you not tell the difference? Look at the "Humor, empathy, resilience", the characters 'r'/'i'/'n' are damaged.

There are more in the fourth column.


Thanks for pointing this out! Filed a bug:

https://github.com/mozilla/mozjpeg/issues/139

I said in another comment that we'd release 3.0 tomorrow, we'll probably hold up the release to investigate this.


Wow, that was fast.

They already fixed the bug. I'm impressed.


Awesome to hear that.

@joshmoz Hopefully, you can re-run the image and share it with us in case we can find something else. :D


Hope they post a bug report, that doesn't look like an acceptable artefact to me


You're right, really big fail on those (and a t of integration, f from of), but otherwise it seems like a really good job.


That's a 1bit scan saved as JPEG. This should have been saved as 1bit PNG.

http://i.imgur.com/2wAcBdL.png (23.43 KB)

For nicer looking images, scan as grayscale and then use Photoshop's Image -> Adjustments -> Curves to turn everything almost-white to white and everything almost-black to black:

http://i.imgur.com/ktj8WkE.png

Alternatively, do a high-DPI 1bit scan, convert the document to 8bit, and then scale it down.

E.g. when you go from 1600 DPI to 100 DPI, you have 16x16 1bit pixels per 8bit pixel. The result will look smooth and crispy.


1-bit images should generally be saved using JBIG2 compression (as far as I know the best lossless compression scheme for 1-bit images), rather than PNG. In some cases CCITT Group 4 compression might be used, for compatibility reasons, e.g. in a TIFF wrapper.


JBIG2 might be the best compression for bitmap images, but you probably never want to use its lossy mode for text images[0]

The fact that a single difference in a configuration bit (lossy/non-lossy) can introduce subtle and easy-to-miss errors (to the point that this went unnoticed by Xerox QA and thousands of their customers!) is an indication to me that while JBIG2 might be superior in terms of the compression it offers, it's not a solution I would use without very serious consideration and deliberation.

Just to make this more clear: if you borked the compression setting on jpeg, you get smeared images. If you bork the lossy/nonlossy flag on JBIG2, you get images that look great but may have a random letter or digit swapped for another.

[0] http://www.theregister.co.uk/2013/08/06/xerox_copier_flaw_me...


thank you! and great tips. the original image was something I grabbed from the web, part of some research. either way really appreciate the tips and the info.




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

Search: