9 Replies Latest reply on May 5, 2009 4:13 PM by justdanyul

    Is there any way of checking if a DNG was converted to Linear

    justdanyul Level 1

      ...when it was created?

        • 1. Re: Is there any way of checking if a DNG was converted to Linear
          Ramón G Castañeda Level 4

          justdanyul wrote:

           

          ...when it was created?

           

           

          ???

           

          Not sure I understand your question.

           

          Raw images, including raw DNGs, are linear images.  More specifically very, very dark linear grayscale images, just like what the sensor captures?

           

          Do you perhaps mean non-linear?

           

          By "when it was created" are you referring to those cameras that can write DNG files to the card in camera?  Or at you talking about raw to DNG conversion through the Adobe DNG Converter?

           

          Or are you maybe thinking of non-linear TIFFs opened in Camera Raw and saved as DNGs?

           

          Can you elaborate?

          • 2. Re: Is there any way of checking if a DNG was converted to Linear
            sandy_mc Level 3

            Linear DNGs are DNG's that have demosaiced - at least that's the how 

            Adobe use the term. If you take a look at the options for the DNG 

            converter, there is a "Linear DNG" option there, an that's how its 

            described. Its also how others e..g., DxO describe the DNGs their 

            product produces.

             

            The geeky way to know is to look at the contents of the file with a 

            dng_validate, or some other format reader. A regular DNG will have 

            samples per pixel of 1 (at least for a Bayer array anyway), while a 

            linear DNG will have samples per pixel of 3. I can't think of a simple 

            way to check though, other than a linear DNG is usually quite a bit 

            bigger than than a regular DNG for the same image; of the order of 

            three times as large. But that's not a reliable way of determining 

            file type because different compression settings can change size 

            dramatically.

             

            Just for the record, a lot (most actually) raw files are NOT linear. 

            They use various non-linear level compression schemes - e.g., Nikon's 

            compressed NEFs (table driven), Leica's M8 DNGs (square law), etc, etc.

             

            Sandy

            • 3. Re: Is there any way of checking if a DNG was converted to Linear
              Ramón G Castañeda Level 4

              sandy_mc wrote:

               

              Linear DNGs are DNG's that have demosaiced - at least that's the how 

              Adobe use the term.

               

              In my book, demosaiced files have always been non-linear, but then I very seldom deal with DNG files, if ever.

               

              Thank you, sandy, for prompting me to learn about this seemingly undesirable option of the actual use of so-called "linear DNG" filesIn the strict definition of DNG, all DNG files are linear.

               

              The following notes* summarize my findings:

               

               

              Notes Explanation of format description terms

              General


              "Raw DNG" and "Linear DNG." The photographer Barry Pearson writes that DNG files are well understood to contain "mosaiced" sensor data (typically from a Bayer array), and he calls this format Raw DNG.  But he reminds readers of another option, Linear DNG, said to be "a rarer variety of DNG, containing RGB image data (or not just RGB!) arranged in a rectilinear format. (Most practical examples of Linear DNG hold RGB image data, but it isn't a constraint, and 4 or more colours [sic] are allowed. For example, A Linear DNG obtained by converting the raw file from a Sony F828 has an extra channel, 'Aqua,' rather like Cyan). This RGB image data may have come from demosaiced raw image data, or from another source such as TIFF or JPEG or something else. (There is little difference between 'demosaiced' and 'never mosaiced').

              Jeff Schewe, writing in a 2005 issue of PhotoshopNews.com reported that Adobe's DNG converter application "allows you to either keep the DNG in the un-demosaiced form or to demosaic the file and convert to a linear file. Generally, you'll want to keep the file in its un-demosaiced form as there is a space savings. Linear DNGs have already been converted to RGB files and therefore are larger." The article as presented includes an inserted editor's note: "[Digital imaging expert] Bruce Fraser sent the following comment regarding Linear DNG: 'The only reason to use Linear DNG is to feed the file to a DNG reader that can't understand the particular flavor of DNG that DNG Converter creates for the specific camera, or to act as an interchange format—e.g., lens correx with DxO can write out a linear DNG that ACR can read. This is typically NOT an option people want, not because of size considerations, but because it's no longer really raw—it's half-baked. All the operations that take place during demosaicing are set in stone and can't be redone.'"

               

               

              [Emphasis above mine—RGC]  Note that I also corrected one misspelling, as there is no such word as "convertor" in the English language, it's converter.

               

              * from :

               

              Sustainability of Digital Formats
              Planning for Library of Congress Collections

               

              ===   ===   ===

               

               

              On a tangential note, count me as those utterly unimpressed by Dxo.

              • 4. Re: Is there any way of checking if a DNG was converted to Linear
                Ramón G Castañeda Level 4

                PS — It's a joy to see the forum software preserve links in text inserted by copy-and-paste.

                • 5. Re: Is there any way of checking if a DNG was converted to Linear
                  Panoholic Level 2

                  Ramón,

                   

                  you are right in that all DNG image data (not files) are linear (well, more or less). The lossil[l]y compressed image data of Nikon, Sony, etc. cameras too becomes linear again after decompression.

                   

                  The demosaiced image data is not always gamma encoded; for example Canon's DPP offers the choice to create linear TIFF output.

                   

                  Gabor

                  • 6. Re: Is there any way of checking if a DNG was converted to Linear
                    Ramón G Castañeda Level 4

                    Thanks for the elaboration, Gabor.  Glad to see you posting again. 

                    • 7. Re: Is there any way of checking if a DNG was converted to Linear
                      Panoholic Level 2

                      Ramón,

                       

                      as you see, I lost my moniker. Panoholic has always been in my profile as "screen name" but never appeared. Now the old one is not there and I can't change this.

                       

                      Anyway, the real problem is, that the forum software is crap and a pain.

                       

                      Gabor

                      • 8. Re: Is there any way of checking if a DNG was converted to Linear
                        Ramón G Castañeda Level 4

                        Panoholic wrote:

                         

                        Anyway, the real problem is, that the forum software is crap and a pain.

                         

                         

                        Agreed 100%, Gabor.

                        • 9. Re: Is there any way of checking if a DNG was converted to Linear
                          justdanyul Level 1

                          thanks alot for the feedback everybody