Alley in Pisa, Italy

by Lars Kotthoff

submit your photo


Hall of Fame
View past winners from this year

Please participate in Meta
and help us grow.

Take the 2-minute tour ×
Photography Stack Exchange is a question and answer site for professional, enthusiast and amateur photographers. It's 100% free, no registration required.

Can I safely convert from sRGB or Adobe RGB to L*a*b color space and back without quality loss?

Lab is the widest color space and therefore it should be possible to convert colors into this color space without any quality loss. When I convert back I will lose some information, but as I started with this color space I think it should be fine. Is that correct?

share|improve this question
    
What are you using to perform the transformation? –  Michael Mauderer Jul 6 at 21:06

2 Answers 2

Because, as you say, L*a*b* is a superset larger than either sRGB or Adobe RGB, you're right, this is safe — if you have enough bit depth to prevent color mapping errors. In practice, this means that if you are working in 16 bits per channel, there is no loss. If you are working in 8 bits per channel, there may be some, as you are spreading your "crayons" quite thin (see the post linked above).

I say "in practice", because there is a very small chance that even when working in 16 bits, if you go back to 8 bit for results, you may find that a value which was represented as (say) "127" gets mapped to something which, due to rounding, comes back as "128". This would only happen in borderline conditions, and it's incredibly unlikely that anyone could ever tell the difference even under the closest inspection. And, since you're most likely doing something to the image in the meantime (working in that L*a*b* space), any potential minute errors are going to be totally lost in even the most minor of "real" adjustments.

share|improve this answer

That depends on where you draw the line for quality loss.

If you are converting to a color space that is larger in all dimensions, then the data won't be clipped to fit, and converting back won't clip the data either.

However, any such conversion means that you get rounding errors. If you convert it back to the original color space (without any other changes), you won't get exactly the same image. Some pixels will have a color that is one-off from the original image, some even more. This is of course not a visible difference, but it can't be considered completely loss-less.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.