JPEG is not lossy on the things it was meant to capture: natural images.
JPEG is just as lossy with natural images as it is with everything else. It's the same algorithm no matter what the image source. The key factor, which you neglect to mention, is the human eye. With the right subject matter and the right compression "quality" setting, most people won't be able to distinguish, by eye, the JPEG from an uncompressed format. Software will though. (Thus, we don't store satellite imagery, for example, in JPEG because of the need for automated analysis.)
For a fixed number of output bits, JPEG is less lossy on natural images than PNG could ever be.
The number of output bits is irrelevant. It's the number of input bits that matters. Neither PNG nor JPEG provides a way to say "compress this image to exactly X bytes." The issue is whether you can decompress your data and retrieve, unaltered, the original input.
It's simple. Both PNG and JPEG are compressed file formats. JPEG makes a trade-off: a slight loss of information for a smaller file size. That's why it is called lossy. PNG doesn't make that trade-off. That's why it is called lossless. Trying to look at it bass-ackward, from the perspective of how many output bits each format results in, and claiming JPEG is "less lossy" than PNG isn't helping anyone, especially not those that are unfamiliar with the concepts.
I know you already understand this merlyn, but instead of a condescending response tainted with a judgement about the original poster's tone ("please stop saying that as if it was a bad thing") why not just make your point...
"JPEG is a very good format for its intended use."
"My two cents aren't worth a dime.";
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.
| & || & |
| < || < |
| > || > |
| [ || [ |
| ] || ] ||