RetouchPRO

Go Back   RetouchPRO > Technique > Photo Retouching
Register Blogs FAQ Site Nav Search Today's Posts Mark Forums Read


Photo Retouching "Improving" photos, post-production, correction, etc.

Convert Curves from Photoshop to Lightroom and vv

Reply
 
Thread Tools
  #1  
Old 09-10-2014, 05:58 AM
embo embo is offline
Junior Member
 
Join Date: Sep 2013
Posts: 4
Convert Curves from Photoshop to Lightroom and vv

Hi !

I often found myself in the tricky situation wanting to be able to apply my PS curves in LR and vice versa. This used to be impossible so I created a small tool to help with that. You can find it here:

http://www.projectgemini.net/curvesTool/

It allows you to copy curve data between Photoshop and Lightroom using ACV and lrtemplate files. It is free to use, although I would appreciate a donation if you find it helpful or if you use it more often. The tool currently works only with LR 2012 development process (when the individual R, G, B curves were introduced), not with any processes before that (2010, 2003).

If any of you is running into problems using it (especially on Mac), please let me know!
Reply With Quote top
  #2  
Old 09-10-2014, 07:35 PM
andrewrodney's Avatar
andrewrodney andrewrodney is offline
Senior Member
 
Join Date: May 2010
Location: Santa Fe
Posts: 1,090
Re: Convert Curves from Photoshop to Lightroom and

I would suspect the working space gamma (TRC) in Photoshop is going to be quite different than in LR (which is 1.0), is there some accounting for this?
Reply With Quote top
  #3  
Old 09-10-2014, 08:11 PM
klev klev is offline
Senior Member
 
Join Date: Jun 2010
Posts: 1,109
Re: Convert Curves from Photoshop to Lightroom and

^^ You can get reasonably close by using 32 bit mode, which uses a working space set to gamma 1.0. It still may not be identical depending on how out of bounds values are handled in Lightroom when working with raw formats. I doubt you will achieve identical behavior.
Reply With Quote top
  #4  
Old 09-10-2014, 08:11 PM
embo embo is offline
Junior Member
 
Join Date: Sep 2013
Posts: 4
Re: Convert Curves from Photoshop to Lightroom and

I definitely noticed differences between application of curves on RAW files and JPG files in LR. While JPG files look similar to PS, RAW files sometimes look differently. If this is due to different gamma spaces, then you probably hit the nail on the head.

I was under the impression that this is because of different color spaces (ProPhoto vs. AdobeRGB vs. sRGB etc.) or bit depths but to be honest, I am not 100% familiar with inner workings of the curve application in different gamma spaces, color curves or bit depths in each host application. As of now, there is no accounting for this and curve data is copied 1 by 1.

Do you have more details / links on this? If someone can provide me with a link to the math behind it (e.g. mapping a 1.0 curve to 2.2 or whatever), I might be able to work this into the conversion process with a simple toggle.
Reply With Quote top
  #5  
Old 09-10-2014, 08:13 PM
andrewrodney's Avatar
andrewrodney andrewrodney is offline
Senior Member
 
Join Date: May 2010
Location: Santa Fe
Posts: 1,090
Re: Convert Curves from Photoshop to Lightroom and

Raw or JPEG, any processing in LR is conducted using it's internal color space which is ProPhoto primaries with a 1.0 Gamma (TRC). That's why I suspect that while you can move a curve from place to place, the results may not match.
Reply With Quote top
  #6  
Old 09-10-2014, 08:27 PM
klev klev is offline
Senior Member
 
Join Date: Jun 2010
Posts: 1,109
Re: Convert Curves from Photoshop to Lightroom and

Quote:
Originally Posted by embo View Post
I definitely noticed differences between application of curves on RAW files and JPG files in LR. While JPG files look similar to PS, RAW files sometimes look differently. If this is due to different gamma spaces, then you probably hit the nail on the head.
JPG files can be tagged with any ICC profile. Photoshop has defined handling for all ICC v2 profiles. I would have to look up their handling of v4 types. Don't say "different gamma spaces". That's not how it works. Gamma is just an attribute. Gamma 1.0 being a presumably linear summation of radiometric values. The profile itself encapsulates more than gamma. An ICC profile describes a specific range relative to XYZ values.

Quote:
Originally Posted by embo View Post
I was under the impression that this is because of different color spaces (ProPhoto vs. AdobeRGB vs. sRGB etc.) or bit depths but to be honest, I am not 100% familiar with inner workings of the curve application in different gamma spaces, color curves or bit depths in each host application. As of now, there is no accounting for this and curve data is copied 1 by 1.
ProPhoto vs the others will cause some differences. Prophoto uses a slightly different gamma and white point (relates to x,y,z mapping at r=g=b=max). Bit depth between 8 and 16 is meaningless in terms of appearance. They define the same range. 8 bit enumerates 2^8 integer values (0-255). 16 bit has something like (2^15)+1 values covering the same range at the same gamma encoding. It merely involves finer steps. 32 bits could be implemented as integer data the same way 16 could be implemented using half-precision floating point values. It's just not implemented that way. If an image uses a linear encoding with floating point values, it is loaded in as a 32 bit image. Photoshop just uses whatever sign extension on the additional mantissa bits and presumably zeros any additional exponential bits. Take this with minor skepticism, because I would have to look up exactly how it's encoded.

Quote:
Originally Posted by embo View Post
Do you have more details / links on this? If someone can provide me with a link to the math behind it (e.g. mapping a 1.0 curve to 2.2 or whatever), I might be able to work this into the conversion process with a simple toggle.
It's a linear mapping applied via matrix multiplication, but I don't have the 2.2 to 1.0 thing memorized. Since they're clamped values, there's more to it. In the case of jpegs you also have to be concerned about issues such as stability. Without some form of dithering, you're likely to see banding converting between a linear space and back. There's also the irritation of converting integers to floating point values, as integer values aren't really appropriate for linear gamma spaces.
Reply With Quote top
  #7  
Old 09-10-2014, 08:31 PM
embo embo is offline
Junior Member
 
Join Date: Sep 2013
Posts: 4
Re: Convert Curves from Photoshop to Lightroom and

Hmm. I am not a super color expert, so this is a bit tricky.

I found this PDF here:

http://ptgmedia.pearsoncmg.com/impri...mRGB_Space.pdf

"If an imported RGB image happens to be missing a profile, Lightroom assumes the profile to be sRGB and assigns it when performing the image processing calculations."

This might explain why curves applied in LR to JPG files look the same as in PS. My JPGs are saved out and imported into LR without a profile (=sRGB) so the behaviour between LR and PS curves is 1:1. I mainly do this to "mass apply" a quick grade to edited files in Lightroom so I dont have to open and save every single file in PS. For this purpose, the conversion tool seems to work fine as is.

Concerning getting RAW files to match the same way, I might look into this issue over the next few days and experiment with additionally applying a 1.8 or 2.2 gamma to curve data. Not sure if this is the way to deal with this however, so if anyone with deeper LR knowledge has some more info on this, I would highly appreciate it.
Reply With Quote top
  #8  
Old 09-10-2014, 08:34 PM
andrewrodney's Avatar
andrewrodney andrewrodney is offline
Senior Member
 
Join Date: May 2010
Location: Santa Fe
Posts: 1,090
Re: Convert Curves from Photoshop to Lightroom and

Quote:
Originally Posted by embo View Post
Hmm. I am not a super color expert, so this is a bit
"If an imported RGB image happens to be missing a profile, Lightroom assumes the profile to be sRGB and assigns it when performing the image processing calculations."
The point I think you're missing is that assumed or known, if you have a rendered image OR raw and you ask LR to apply edits (presumably the reason you're making a curve), the processing color space that is used has a 1.0 TRC gamma processing upon that data. IOW, in Photoshop, a curve or any processing takes place on the data in that working space and it's gamma. That's not what happens in LR or ACR.
Reply With Quote top
  #9  
Old 09-10-2014, 09:05 PM
klev klev is offline
Senior Member
 
Join Date: Jun 2010
Posts: 1,109
Re: Convert Curves from Photoshop to Lightroom and

Quote:
Originally Posted by embo View Post
Hmm. I am not a super color expert, so this is a bit tricky.

I found this PDF here:

http://ptgmedia.pearsoncmg.com/impri...mRGB_Space.pdf

"If an imported RGB image happens to be missing a profile, Lightroom assumes the profile to be sRGB and assigns it when performing the image processing calculations."

This might explain why curves applied in LR to JPG files look the same as in PS. My JPGs are saved out and imported into LR without a profile (=sRGB) so the behaviour between LR and PS curves is 1:1. I mainly do this to "mass apply" a quick grade to edited files in Lightroom so I dont have to open and save every single file in PS. For this purpose, the conversion tool seems to work fine as is.

Concerning getting RAW files to match the same way, I might look into this issue over the next few days and experiment with additionally applying a 1.8 or 2.2 gamma to curve data. Not sure if this is the way to deal with this however, so if anyone with deeper LR knowledge has some more info on this, I would highly appreciate it.
Maybe I made that too complicated and out of order. Here are the important things, having nothing to do with Lightroom knowledge. The first is that you're limited by the color handling of your workspace, which include the weighted range of the tristimulus values relative to xyz and the number of values defined over that range. If you try to stay in sRGB and merely pull the gamma way down, most of the values in that image will be mapped into a very small portion of that range. Since this will not result in a 1:1 mapping, you will lose detail going about it that way. Using a curve will be even more of a mess, because your points will then be so close together. They will not be controllable, and it will be a mess. If you really want to do this, you have to convert to 32 bits, then you have to figure out counter-measures for any quality loss encountered when making those adjustments on data that was previously saved in sRGB with lossy compression.

I deleted the rest of the post, because it goes in too many directions without providing a clear explanation of any of them. I also unintentionally misuse terms at times.

Last thing I'll add back is that the term linear will be used in two cases when dealing with image data. The first means the image data is enumerated in a way that the intensity over a given wavelength range is radiometrically linear. You will also see the term linear when referring to transformations between color spaces. That is a math reference referring to a linear transformation of data.

Last edited by klev; 09-10-2014 at 09:28 PM.
Reply With Quote top
  #10  
Old 09-11-2014, 06:49 AM
embo embo is offline
Junior Member
 
Join Date: Sep 2013
Posts: 4
Re: Convert Curves from Photoshop to Lightroom and

OK, thanks for your input guys! Point taken and took everything down! ;-)

I realize that what works for me does not necessarily have to work for other people and unless I have a 100% predictable and correct solution to this problem (with matching results), there is no point offering this conversion tool even though I am stating that it is only copying curve points 1:1 and not dealing with color space / gamma issues.

I don't want users to be misled. :-)
Reply With Quote top
Reply

  RetouchPRO > Technique > Photo Retouching


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -6. The time now is 01:03 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
Copyright © 2016 Doug Nelson. All Rights Reserved