Talk:Lossy compression

From Wikipedia, the free encyclopedia

Of course, who could forget lzip?

This page should probably be consolidated with the codec page

  • I disagree. A codec is an implementation, whereas compression is a field of study. There is room for them both. - grubber 09:41, 2005 Jun 23 (UTC)

Contents

[edit] Lena image

This is the proper forum to discuss the image in question, rather than trying to squeeze the comments in the history. I chose the Lena image because it is the standard image to use when you talk about any type of image processing. As far as I can determine, the image is still under Playboy copyright, but it is practically in the public domain (perhaps it already is?) because of its proliferation. This is the image that should be used. - grubber 17:48, 2005 July 22 (UTC)

  • I went ahead and put the page back today because you have not responded here and you may not be watching this page. That will let you know that we can continue talking about it here if you wish. - grubber 21:38, 2005 July 24 (UTC)
    • I'm a beliver that fair use images should be a last resort for a variety of reasons including the fact they are unlikly to make it into any future DVD or print release of wikipedia. Whilst the lenna image may be some kind of standard in some professional image editing circles i don't belive using it really adds anything to this wikipedia article. Plugwash 10:49, 7 September 2005 (UTC)
  • There is a problem with this image comparison frame which should be obvious but apparently isn't, given the fact that it still exists: the image titled "Original Lena Image" is a JPEG. May I note that using a lossy file as a reference is a bit missing the point ... any image or sound file bearing the title of "Original X" and serving the purpose of reference quality should be 1) in a lossless format (PNG or FLAC), and 2) made from an original lossless source, eg camera output in RAW or TIFF mode, WAV file ripped from a CD, therefore possessing no artifacts of lossy compression. It is important to obtain an unartifacted PNG version of that image, otherwise the title "Original Lena Image" is misleading. Failing that, I suggest I can provide some image I filmed with my digital camera (in TIFF mode, of course) converted to PNG for the original and various levels of JPEG compression for the demonstration of the effects of lossy compression. --Shlomital 21:43, 13 October 2005 (UTC)

[edit] Replacement Proposal

Original Image (lossless PNG, 60.1 KiB size)
Original Image (lossless PNG, 60.1 KiB size)
Low Compression (91% less information, 9.37 KiB)
Low Compression (91% less information, 9.37 KiB)
Medium Compression (95% less information, 4.82 KiB)
Medium Compression (95% less information, 4.82 KiB)
High Compression (98% less information, 1.14 KiB)
High Compression (98% less information, 1.14 KiB)

What do you think? --Shlomital 11:31, 14 October 2005 (UTC)

I would recommend throwing out the medium compression example and replace the high compression with one not quite so high, maybe 96 or 97%, pick one that shows apparent distortion, but not as extreme as 98%. 199.125.109.15 00:28, 10 August 2007 (UTC)

[edit] Lena image, retry

I've managed to find a TIFF version of the Lena image, on one of the sites linked to from the Wikipedia article Lenna. Upon inspection, the image contains noise resultant of scanning, but no artifacts of lossy compression.

Image:Lena-Original.png
Original Image (lossless PNG, 463 KiB size)
Image:Lena-89less.jpg
Low Compression (93% less information, 50.6 KiB)
Image:Lena-96less.jpg
Medium Compression (98% less information, 16 KiB)
Image:Lena-99less.jpg
High Compression (99.5% less information, 4.34 KiB)
  • Pro: the image is better for showing the results of lossy compression.
  • Con: its licensing terms are uncertain (and that's probably an understatement).

My prievous image (of the dog) is the best I could offer as a replacement free of licensing problems (my copyright, released under the GFDL); I don't see how I can put an image comparable to Lena in its suitability for the demonstration of lossy compression, as I can't see myself taking some person's picture and putting it on Wikipedia. I hope the choices so far give you enough room to make a decision. --Shlomital 15:18, 14 October 2005 (UTC)

The dog image is certainly a good illustration of the point. I like the Lena image because it is the standard one to use for anything to do with image processing. As for the copyright issue, Playboy stopped suing people long ago and this is, in my unlegal opinion, fair use. So, that's where I stand. :) (Perhaps "initial" is a more appropriate term than "original", but it's a minor issue). - grubber 23:40, 15 October 2005 (UTC)
I'm not greatly familiar with fair use rules but even if this can be considered a valid fair use case (which i personally doubt) and is practically safe to use due to playboy having stopped caring about it, having fair use images unnessacerally hurts the re-usability of wikipedia (and i include official or semi-official dvd or print editions in that statement).
oh and btw don't use percentages when talking about JPEG compression levels (it misleads people into thinking that the highest quality setting is lossless) and try and use a standard and freely availible encoder to make things easilly repeatable (e.g. the standard ijg cjpeg). Plugwash 01:15, 16 October 2005 (UTC)
I've used a percentage because it seems to me the only objective way of specifying JPEG settings. To prepare the images, I used IrfanView with JPEG quality setting at 85 for the first image, 30 for the second image and 5 for the third image. Now in Paintshop Pro 8 those settings would, I think, be the opposite (15, 70, 95). And even then, I can't be sure they are the same. From the JPEG FAQ: "In fact, quality scales aren't even standardized across JPEG programs. The quality settings discussed in this article apply to the free IJG JPEG software (see part 2, item 15), and to many programs based on it. Some other JPEG implementations use completely different quality scales. [...] Fortunately, this confusion doesn't prevent different implementations from exchanging JPEG files. But you do need to keep in mind that quality scales vary considerably from one JPEG-creating program to another, and that just saying 'I saved this at Q 75' doesn't mean a thing if you don't say which program you used". So I find percentages or ratios to be a more objective measure than quality setting numbers. But of course, if you think otherwise and have got IJG handy, you're welcome to re-encode from the original PNG and change the descriptions. As for the copyrights problem, IANAL either, so I leave it to others to make the choice between my free image and the doubt-raising Lena image. --Shlomital 11:09, 16 October 2005 (UTC)
I've just found out that IrfanView uses the IJG scale as it should be. It's Paintshop Pro that does it the other way round (100−IJG), while Photoshop has a completely different way of specifying JPEG quality (see [1]). So the quality settings are indeed 85, 30, 5 for each image in descending order of quality. I still doubt the objective value of the IJG scale, though. --Shlomital 14:36, 16 October 2005 (UTC)
Actually, saying "85% less information" isn't accurate (and it is my error). That implies we have lost 85% of the information, when some of the information may have been losslessly compressed, which would not change the actual information content of the image.
All I'm asking for is some objective measure of JPEG quality. If I'm convinced that the IJG scale serves as such a measure, I'll use it. By the way: by "information" here, not the casual sense is meant, but the specialised sense of the rate of bits, as in the science of information theory that Claude Shannon pioneered. --Shlomital 23:04, 16 October 2005 (UTC)
Lossless compression does not reduce information content. It's a deterministic invertible map and the entropy of deterministic invertible functions of random variables does not change. If you want to calculate the mutual information between the first image and the lossy-compressed image, you would then have a measure of the amount of information lost. But, comparing file sizes is not a measure of information loss. - grubber 01:53, 17 October 2005 (UTC)
As for the fair use idea, if we should not include a picture of Lena in this article because it taints Wikipedia, then do we remove the picture from the article about Lena too? That would seem silly, and if we keep it there, then we should keep it here for the same reason. - grubber 22:22, 16 October 2005 (UTC)
Not a legal expert's opinion, of course, but it seems to me the use of the Lena picture in Lenna is much more justifiable, much clearer a case of fair use, than its use in Lossy data compression. Because, in the Lena article the picture is about the subject of the article, and it's fair to use it there just as it's fair to, for example, use screenshots from Star Trek in the Star Trek article, out of necessity for the article. Whereas, in the Lossy Data Compression article there is nothing necessary about the Lena image; the only requirement is a series of pictures that show the effects of lossy data compression, so the use of the Lena image isn't so fair anymore. --Shlomital 17:21, 17 October 2005 (UTC)
Fair use is one of those nasty things that depends heavilly on context and varies a huge amount by country. There would indeed be some advantages to eliminating fair use images completely and some wikipedias have decided to do this en not being one of them at least for the moment. However that does not mean we should use such images where there is a reasonable alternative availible. Plugwash 22:40, 16 October 2005 (UTC)
No doubt my image is safer to use than the Lena image. The only reason I'm pondering this, and haven't changed the image on the article page, is that I don't know if it's as suitable as the Lena image for showing the effects of lossy compression (for one thing, it lacks continuous tones). On the HE Wikipedia I've included the dog image for the article. I was able to do this without hesitation because, well, I started the article. ;-) --Shlomital 23:04, 16 October 2005 (UTC)
I'm willing to concede if you all think we should scrap the Lena image. As a matter of style and a nod to image processors I think it would be nice to keep it, but it is indisputible that there are legal questions that may be at odds with Wikipedia's philosophy. The dog image serves the purpose of the article just fine. - grubber 02:00, 17 October 2005 (UTC)

[edit] Compression

For the images in the article, the compression isn't linear is it? Isn't it rounded so that at a certain point there is not much of a difference even if it is compressed more? And that in the beginning, compression saves more than is taken. 70.111.218.254 20:21, 5 November 2006 (UTC)

[edit] How to

How do you convert an image to Lossy format? Could somebody just give me a basic how to? Harvey100 09:59, 28 January 2007 (UTC)

[edit] All Recording Is Lossy

By the very nature of recording live events much of the performance is not captured by the camera and microphone. Data or part of the performance not recorded is lost therefore recording in general is lossy. Only the original event is a "lossless" version. Any recording rejects most of what is going on such that the important content may be saved or recorded. CD quality does not really mean much as a point of reference because the CD recording could be very good quality or very poor. Good quality is less lossy than poor quality. The question is how much loss can be endured and still maintain the original intent of the content. This has been a question of much discussion and is yet unresolved. The only thing for certain is if a recording is treated as "lossless" which it is not, a comparison to other lossy methods and formats will not give a valid result to which recording method is most like the original because none are the origial so no conclusion may be drawn. The common error is compare lossy formats and claim one is better based on comparison to non-original works.MrNT 01:27, 29 January 2007 (UTC)

This article is about compression, not recording. So, why should anybody care whether recording is lossless or not? —Preceding unsigned comment added by 87.180.120.183 (talk) 13:18, 28 November 2007 (UTC)

[edit] Transcoding

This page really needs a mention of transcoding and a link, but I don't have the time nor knowledge to really do it justice. disastrophe 03:54, 6 November 2007 (UTC)