3 Replies Latest reply on May 8, 2018 12:49 AM by sandy_mc

    dng_validate - Missing or invalid SamplesPerPixel

    shakesbeery Level 1

      Hi all,

       

      I'm working on a program to wrap image info into a dng format, but have run into a snag that I cannot find in the documentation. I'll start off with the verbose output of dng_validate:

       

          Uses little-endian byte order

          Magic number = 42

       

          IFD 0: Offset = 8, Entries = 20

       

          NewSubFileType: Preview Image

          ImageWidth: 62

          ImageLength: 41

          BitsPerSample: 8 8 8

          Compression: Uncompressed

          PhotometricInterpretation: RGB

          Make: "Test Program"

          Model: "V1"

          StripOffsets: Offset = 386

          Orientation: 1 - 0th row is top, 0th column is left

          SamplesPerPixel: 3

          RowsPerStrip: 41

          StripByteCounts: Count = 7626

          PlanarConfiguration: 1

          Software: "Test"

          DateTime: 1900:01:01 00:00:00

          SubIFDs: IFD = 8012

          DNGVersion: 1.4.0.0

          DNGBackwardVersion: 1.1.0.0

          UniqueCameraModel: "Test Program"

          NextIFD = 0

       

          SubIFD 1: Offset = 8012, Entries = 10

       

          NewSubFileType: Main Image

          ImageWidth: 1000

          ImageLength: 667

          BitsPerSample: 16 16 16

          Compression: Uncompressed

          PhotometricInterpretation: LinearRaw

          StripOffsets: Offset = 8144

          SamplesPerPixel: 3

          RowsPerStrip: 667

          StripByteCounts: Count = 4002000

          NextIFD = 0

       

       

      *** Error: Missing or invalid SamplesPerPixel (SubIFD 1) ***

       

      So obviously SamplesPerPixel is present in SubIFD 1, and I've seen plenty of dngs that have LinearRaw with 3 channels. The image won't open in photoshop or in lightroom and I can't find any indication as to what the actual problem is. Help greatly appreciated. Thanks.