Photoshop's JPEG code is bad software. I'm a longtime Gimp user. But lately I've been playing around with RAW images and colour profiles, and Gimp does badly with those. So I'm giving Photoshop Elements a free trial.

I mostly like it, but its JPEG saving is insane. Not only does Photoshop not use the same 0-100 quality scale that all the other tools I know use, they have two different ways to save JPEG, with different scales. Neither work right.

I have a picture, a portrait from my Digital Rebel XT. It's 3456x2304 and about 9 megs as a PNG. If I convert it to jpeg using cjpeg -q 75, the baseline for JPEG creation, it's a 580k file. OK, all well and good.

If I try to use Photoshop's "Save for Web", the quality slider lets me choose 0–100. I set it to 75 and the resulting image is 1.4 megs! That's about like a cjpeg 92. OK, so they have a different scale. Fine. But no matter what I do I can't get a 580k file out of the tool. A quality of 50 yields 554k, a quality of 51 yields 677k. Why the giant jump? Shifts to 49 or 52 don't yield nearly as much a difference. To make matters worse, "Save for Web" leaves out all your EXIF data. And the tool gives you dire warnings about 8 megapixels being too big an image. Um, right.

The normal "Save as.." in Photoshop is a bit better. The JPEG option has a quality slider, too, but this one goes from 0–12. Because you know, 12 is better than 10. Generating a 580k file is still impossible. Given there's only 12 quality steps that's not too surprising. But there's still a giant jump: quality 8 is 607k, quality 7 is 400k. What's going on?

I guess I shouldn't be this fiddly about JPEG settings, but I'm truly mystified as to what Photoshop is doing. cjpeg gives a nice smooth quality/size tradeoff with lots of fine grained adjustments right in the middle of the sweet spot. Photoshop seems to make it impossible to control the same tradeoff. No wonder so many online images are poorly compressed.

  2005-07-24 19:37 Z