Skip to main content
news

Re: Is RGB to Lab lossy? -...

Eric Stevens
SubjectRe: Is RGB to Lab lossy? - was(Re: Lenses and sharpening)
FromEric Stevens
Date10/05/2014 06:06 (10/05/2014 17:06)
Message-ID<lh013apbeokvnrvl07b5r4kjsms83cd9dt@4ax.com>
Client
Newsgroupsrec.photo.digital
Followsnospam
Followupsnospam (20h & 59m)

On Sat, 04 Oct 2014 17:08:28 -0400, nospam <nospam@nospam.invalid> wrote:

nospam
In article <dam03ahe9ga3n8em89m713beh1t6t7r4c9@4ax.com>, Eric Stevens <eric.stevens@sum.co.nz>wrote:

Eric Stevens
4. To confirm the point I took a screen shot. See https://dl.dropboxusercontent.com/u/31088803/Lab%20test%20Screen.jpg Note the histogram. All of the pixels appear to be down at the zero end of the scale: that is, jet black.

nospam
notice the differences at the left end of the histogram.

however, this is about round-tripping from rgb to lab and then back. you only did half.

Eric Stevens
Fir comment. I've just compared the original JPG with a copy -->Lab -->JPG again. JPGs are RGB are they not?

nospam
usually but not always

Eric Stevens
Then what else might they be and under what circumstances?

nospam
cmyk

OK, but RGB is the default.

Eric Stevens
The only conclusion I can reach is that there is no difference between a PSD created from a RGB file and a PSD created from the same image when it has first been converted from RGB to Lab.

nospam
there is. it may not be a huge difference, but there is a difference.

Eric Stevens
As soon as you do anything in Photoshop there is a difference due to rounding errors (quantization) but is this all you are objecting to?

nospam
you do realize that adds up, right?

Eric Stevens
Yes, and it's common to evrything you do. So why does converting to Lab allegedly make it so much worse?

nospam
i didn't say converting to lab was much worse.

i said that rgb->lab->rgb is not lossless. you may not care about the loss, but it's definitely there.

margulis is wrong.

Read this extract from the exchange at https://www.ledet.com/margulis/ACT_postings/ColorCorrection/ACT-LAB-damage.htm

============================================================From: Dan Margulis, 76270.1033@compuserve.com Date: Tue, Apr 24, 2001, 9:53 AM RE: [colortheory] A real world example of the RGB>LAB>RGB debate...

Stephen writes,

Eric Stevens
I was very shocked at the effects of the simple mode change from

RGB>LAB>RGB on APS4 and 5.5. Here are the links so you can view the differences, and download and see for yourself:>>

What seems to have happened here is that the file was intended to be Adobe RGB, but during conversion to LAB it was assumed that it was an sRGB file. That will, of course, hose all the colors. The possibility of such hijinks is a major reason that many users avoid Adobe RGB.

Treating this as an Adobe RGB file, and converting RGB>LAB>RGB five times, I get the normal result, no variation of any significance, quality-wise or statistical.

Dan Margulis

P.S. If this file were properly converted to sRGB, this would be an example of the kind of file that *wouldn't* convert well, because so much of it is close to the edge of the gamut. But sRGB>LAB>sRGB, although not lossless, would be better than, for example, sRGB>Adobe RGB>sRGB. ============================================================== Dan Margulis is not making simple blanket statements capable of being rebutted in the same fashion. Also, look at the date.

nospam
compare a high quality jpeg with the original and you'll see black as you did above, but there are definitely differences (and actually, less of a difference than the rgb-lab conversion).

Eric Stevens
What is the difference with rgb-Lab-rgb conversions and what causes them?

nospam
read the link and pay attention to andrew rodney.

Eric Stevens
Do you mean where he says:

"ANY colorspace conversion can cause these quantization errors (RGB to RGB as an example)."

nospam
that's part of it.

ignore marguilis, not just in that link but in general. he has claimed that 16 bit editing was a waste, which it absolutely is not. i dunno if he still claims it but he probably does.

Eric Stevens
I bet you are quoting him out of context.

nospam
nope.

<http://www.brucelindbloom.com/index.html?DanMargulis.html> ...If an example is presented that shows an 8-bit/16-bit difference, a rule is immediately created, on-the-spot, that disqualifies the image. None of Dan's original six conditions would disqualify a ProPhoto image (you can read these conditions below in section I), but it appears as though ProPhoto images are no longer acceptable. If one takes this technique to its logical conclusion, Dan's 16-bit challenge would become "When considering all images showing no 16-bit advantage, 16-bit images show no advantage."

do you see people arguing to edit jpegs? of course not.

Eric Stevens
What exactly do you mean by that?

nospam
you say you can't see a difference in an rgb-lab-rgb conversion and you subtracted them and saw all black, therefore, you have deemed them to be equivalent.

Eric Stevens
I didn't say that. Read it all again carefully. I compared an rgb-lab-rgb conversion to the original JPG.

nospam
you said you saw black when subtracting them.

I also pointed out the significance of the resulting histogram.

if you do the same for jpeg, you will also not see a difference, and if you subtract, you'll also see all black. therefore, a jpeg should be equivalent to an original raw.

Eric Stevens
That is squiffy logic and it's not even a good parody of what I did.

nospam
it's *exactly* the same logic.

you're position is if you can't see it then there is no difference.

Rubbish. My position is that even if there is a difference, the difference doesn't matter if you can't see it.

the reality is that there *is* a difference. you might not consider the difference to be significant (and indeed it is is very small), but there *is* a difference, therefore it is *not* lossless.

bottom line: rgb->lab->rgb offers no benefit (other than possibly contrived edge cases nobody will ever encounter).

Eric Stevens
You have backed off considerably from your original opinion on this matter.

nospam
no i haven't at *all*.

stop lying about what i say.

Don't be such an overly sensitive git. I said nothing specific about what you said. I said that you have backed off considerably from your original opinion in this matter. That is nothing that you said. It is something that *I* said.

I've done considerable reading about this matter since you raised it and I now have a much better understanding about where the problems might lie. The conversion to and from say RGB to Lab and vice versa can be lossy, but so too can the conversions from (say) ProPhotoRGB to aRGB, from aRGB to sRGB and vice versa. Also, to or from any of these to CMYK. The problem is not the colour system but the colour space used by that system. You can see that that is really the problem when you read the discussion cited by nospam.

(Any) RGB to Lab is not a problem as Lab has an enormously wide gamut, way into the regions of imaginary colours. But it's very easy to create colours in Lab for which there is no place in any system using RGB. Now that is where things can get lost. --

Regards,

Eric Stevens

nospam (20h & 59m)