4 Replies Latest reply on Apr 17, 2016 11:25 PM by noamr

    Reading luma values from image

    noamr

      Hi,

       

      I'd like to make create a plugin that changes an image's saturation based on luma values, similar to Davinci resolve's Lum VS Sat curve.

      How can I read the luma values of an image? I couldn't find any image manipulation methods in the SDK, but perhaps I'm not looking at the right place.

       

      Thanks

       

      Attached the Lum VS Sat curve from DR.

       

      lum_vs_sat.png

        • 1. Re: Reading luma values from image
          johnrellis Most Valuable Participant

          The SDK API won't let you change individual pixel values, which is what I think would be required to change the saturation of a pixel based on its luminosity.

           

          The SDK does let you change the same develop settings you can change in the user interface (e.g. exposure), via photo:applyDevelopPreset(), the undocumented photo:applyDevelopSettings(), and LrDevelopController.  But none of the sliders in the user interface would let you accomplish your end, so you can't do it with the SDK.

           

          You could write an external editing application (e.g. in C++ or Swift) that provides such a feature for TIFFs.  You'd interface it to LR as an "external editing plugin", like the Nik plugins.   But I don't think this was what you're thinking of.

          1 person found this helpful
          • 2. Re: Reading luma values from image
            noamr Level 1

            Manipulating images pixel by pixel by myself is out of my depth.

            Thanks for the quick responce.

             

            I  wish Adobe would include these features in Lightroom or Camera RAW.

            • 3. Re: Reading luma values from image
              jarnoh Level 1

              You can create a custom camera profile which allows you to replicate this for RAW images.  See DNG SDK for details on the camera profiles.

              • 4. Re: Reading luma values from image
                noamr Level 1

                I'm not a professional developer or proficient in C\C++.  I wanted to use the luma v saturation near the end of my post processing workflow as an integrated part of Lightroom. If I had to choose whether to mess around with DNGs put the finishing touch on Resolve, I'd go for the later.

                 

                Again, thanks for the help.