Highlighted

Create a DNG File...

New Here ,
Nov 01, 2019

Copy link to clipboard

Copied

Hi,

I am working on camera integration project in .NET and the desired output is DNG. we are able to read the rawdata from the camera, we are unable to convert the same to DNG format. 

 

any suggestions / code snippets will help us to take it further.

 

regards

Suresh

Topics

DNG, How to, Windows

Views

371

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more

Create a DNG File...

New Here ,
Nov 01, 2019

Copy link to clipboard

Copied

Hi,

I am working on camera integration project in .NET and the desired output is DNG. we are able to read the rawdata from the camera, we are unable to convert the same to DNG format. 

 

any suggestions / code snippets will help us to take it further.

 

regards

Suresh

Topics

DNG, How to, Windows

Views

372

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
New Here ,
Nov 02, 2019

Copy link to clipboard

Copied

after converting to DNG and running the code these are the errors we are getting. 

 

Uses little-endian byte order
Magic number = 42

IFD 0: Offset = 8, Entries = 43

NewSubFileType: Main Image
ImageWidth: 4640
ImageLength: 3506
BitsPerSample: 8
Compression: Uncompressed
PhotometricInterpretation: LinearRaw
StripOffsets: Offset = 5454
Orientation: 1 - 0th row is top, 0th column is left
SamplesPerPixel: 1
RowsPerStrip: 3506
StripByteCounts: Count = 16267840
PlanarConfiguration: 1
DateTime: 2019:11:02 13:00:12
XMP: Count = 4548, Offset = 550
XMP: <?xpacket begin="\357\273\277" id="W5M0MpCehiHzreSzNTczkc9d"?>
XMP: <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="XMP Core 4.4.0-Exiv2">
XMP: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
XMP: <rdf:Description rdf:about=""
XMP: xmlns:tiff="http://ns.adobe.com/tiff/1.0/"
XMP: xmlns:xmp="http://ns.adobe.com/xap/1.0/"
XMP: tiff:DateTime="2019-11-02T13:00:12+05:30"
XMP: xmp:MetadataDate="2019-11-02T13:00:12+05:30"/>
XMP: </rdf:RDF>
XMP: </x:xmpmeta>
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP:
XMP: <?xpacket end="w"?>
ExifIFD: 5436
DNGVersion: 1.4.0.0
DNGBackwardVersion: 1.1.0.0
UniqueCameraModel: ""
BlackLevelRepeatDim: Rows = 1, Cols = 1
BlackLevel: 0.00
WhiteLevel: 0
DefaultScale: H = 1.0000 V = 1.0000
DefaultCropOrigin: H = 0.00 V = 0.00
DefaultCropSize: H = 4640.00 V = 3506.00
ColorMatrix1:
1.0000 0.0000 0.0000
0.0000 1.0000 0.0000
0.0000 0.0000 1.0000
AnalogBalance: 1.0000 1.0000 1.0000
AsShotNeutral: 1.0000 1.0000 1.0000
BaselineExposure: -1.00
BaselineNoise: 1.00
BaselineSharpness: 1.00
LinearResponseLimit: 1.00
AntiAliasStrength: 1.00
ShadowScale: 1.0000
CalibrationIlluminant1: D65
BestQualityScale: 1.0000
RawDataUniqueID: <fd529c3915a6f989ddb920305d1d60b7>
ProfileName: "Embedded"
ProfileEmbedPolicy: Allow copying
OriginalDefaultFinalSize: H = 0 V = 0
OriginalBestQualityFinalSize: H = 0 V = 0
OriginalDefaultCropSize: H = 0.00 V = 0.00
NewRawImageDigest: <d0effc2737444b8a54aab7fc001b41a7>
DefaultUserCrop: T = 0.00 L = 0.00 B = 1.00 R = 1.00
NextIFD = 0

Exif IFD: Offset = 5436, Entries = 1

ExifVersion: 2.30
NextIFD = 0

*** Warning: Missing or invalid UniqueCameraModel ***
*** Error: Missing or invalid SamplesPerPixel (IFD 0) ***

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...
sandy_mc LATEST
Enthusiast ,
Nov 02, 2019

Copy link to clipboard

Copied

  1. The warning is because UniqueCameraModel is blank.
  2. The error is because you haven't set SamplesPerPixel. For the main image IFD, a LinearRaw image typically has a setting of 3 (RGB)

 

Note that the DNG file structure above is not a good idea.  IFD 0 should be a preview image, not the main image. Also 8 bit LinearRaw image formats without a tone curve will quite likely show banding.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
Reply
Loading...