Why is JPEG considered a "lossy" graphics format?
I'm just starting out in the Web world and was just told by someone else who I respect that I should be careful with the JPEG graphics format because it's "lossy". I have no idea what that means, however. Can you enlighten me?
While I'm a big fan of the JPEG graphics format myself - just about every screenshot on Ask Dave Taylor is in JPEG format - I know exactly what your friend is talking about. A lossy graphics format is one where a small amount of information about the original picture is lost each time the image is saved.
To understand why that happens, it's critical that you know that the Joint Photographic Experts Group "JPEG" format uses a compression algorithm to try and shrink down the resultant image file size. You can see this quite easily by creating a 100x100 pixel solid black image then saving it as a JPEG. It'll be amazingly small considering that it's actually holding information on 10,000 different individual pixels or dots of information (on my Mac, it's only 823 bytes in size).
The specific compression that JPEG uses is quite fascinating, built upon fractals and Mandelbrot sets, but that's another story entirely (which you can start learning about at Bernard Mandelbrot's site)
Anyway, back to lossy JPEG compression!
The problem is that when JPEG compressed images are re-expanded, there's just less information available than there had been before. This doesn't change for a given static JPEG file, but if you keep editing the file, each time you save it, you're compressing it a bit more, that is, losing a bit more information from the original.
Let's have a quick look. First off, here's a nice, detailed original image I'm going to start with:
This is saved in 100% quality so while it has some loss simply because it's in JPEG format, it's the minimum possible.
Now I'm going to open up and save the image a half-dozen times, using 75% image quality each time so I've got a constantly degrading image. Here's the result:
It still looks surprisingly good, given that the first image is 190Kbytes and the second is only 18Kbytes. A testimonial to the brilliance of the compression algorithm.
But we have lost data. Let's zoom in on the tiger's eye and you'll be able to see what I mean.
In the following image, the eye on the left is from the original Tiger image, and the eye on the right is the same section of the photo, but from the highly compressed file:
As is clearly obvious, the price we've paid for a much smaller file size is that we've lost quite a bit of the original image detail. In pictures of this nature, it might not seem terrible, but the loss of image data in JPEG format is a significant issue for photographers and others who need to retain original image quality.
Anyway, I hope that clarifies why JPEG is considered a "lossy" format!
✔ How to Create Predefined Google Image Search Links?
Thanks for the Amazon URL [see Creating Amazon Search Links]. That worked beautifully. In fact, I sent you $5.00 for coffee in thanks....✔ Can I embed a Facebook search box on my blog site?
I've seen your articles about how to add a Twitter or Google search box on a Web page, but I have a tougher...✔ Can I use CSS for drop shadows on my blog?
I want to give my site a bit of a facelift and add some neat graphical elements. One of which is drop shadows....✔ How can I embed interactive photo panoramas on my site/blog?
I read through your blog entry about how to take panoramic photos with iOS 6 and an iPhone 5 and got enthused. I've...✔ How can I create a Twitter search URL shortcut?
I'd like to add a few Twitter search links to my Web site. Is that possible, or does Twitter prohibit this sort of...
Let's stay in touch!
Sign up for my weekly AskDaveTaylor Newsletter and you'll receive even more tech and gadget help right to your inbox, along with exclusive news and industry updates. It's good stuff. I promise!
I do have a comment, now that you mention it!
Check This Out Too...
Look for Answers
All Our Categories
Apple iPad Help
Articles and Reviews
Auctions and Online Shopping
Blogs and Blogging
Building Web Site Traffic
Business and Management
Computer and Internet Basics
d) None of the Above
Google Gmail Help
Google Plus Help
Industry News and Trade Shows
iPhone and Cell Phone Help
iPod, Sony PSP and MP3 Player Help
Kindle Fire Help
Mac OS X Help
Pay Per Click (PPC) Advertising
Search Engine Optimization (SEO)
Shell Script Programming
Tech Support Video Help
The Writing Business
Twitter, LinkedIn and Social Network Help
Unix and Linux Help
Video Game Tips and Help
Windows PC Help
Find Me on Google+
ADT on G+