makedng(1)
okay bestie, sit down, hydrate, and let me tell you about makedng(1) β it's from the General Commands Manual and it's genuinely one of the most lowkey useful little tools out there. π
β¨ NAME β¨
makedng β pack raw sensor data into a dng file with metadata π
πΈ SYNOPSIS πΈ
makedng [OPTIONS] input-file output-file
OPTIONS := { -w width | -h height | -p pixfmt | -m make,model | -s
software | -o orientation | -n r,g,b | -b r,g,b | -e program }
π¦ DESCRIPTION π¦
So here's the vibe: it reads your raw sensor data from a file, and it generates a DNG 1.4 compliant file with all the metadata you need to actually render that file correctly. That's it. That's the whole job. And it does it flawlessly. π
π OPTIONS π
-wwidth,-hheight,--widthwidth,--heightheight β sets the width and height of your source data. This is a required option, no skipping it bestie.-ppixelfmt,--pixfmtpixelfmt β sets the pixelformat for the source data. It takes a V4L2 fourcc code, or the V4L constant name like"RGGB"and"SRGGB8". Also required. Yeah. Both of them. Required required.-mmake,model,--modelmake,model β sets the camera Make and Model as a comma separated string. π-ssoftware,--softwaresoftware β sets the name of the camera software that was used to take the picture.-oorientation,--orientationorientation β sets the orientation of the image data, as a number from1-8straight out of the DNG specification.-cdcp-file,--calibrationdcp-file β loads a DCP calibration file and appends the color profile onto the final DNG. glow up unlocked β¨-nred,green,blue,--neutralred,green,blue β sets the neutral whitepoint for the picture as the 3 floating point gain values.-bred,green,blue,--balancered,green,blue β sets the analog sensor gain for the three color channels, as three comma separated floats.-eprogram,--programprogram β sets the exposure program in the EXIF data, using one of the program numbers from the DNG spec.-tseconds,--exposureseconds β sets the exposure time for the picture in seconds (eg.0.01for 1/100).-iiso-speed,--isoiso-speed β sets the ISO speed rating for the picture.-ffnumber,--fnumberfnumber β sets the aperture size, aka the f-number, of the picture (2.2for f/2.2).-lfocal-length,crop-factor |-lfocal-length,--focal-lengthlen,crop,--focal-lengthlen β sets the focal length for the lens. And listen: if you don't supply a crop factor for the system, it just assumes a 35mm full-frame sensor. iykyk.
π PIXEL FORMATS π
The pixel format argument accepts the following values:
π« 8-bit bayer formatted data, this matches with MIPI RAW8:
RGGB,SRGGB8: RG,GB bayer pixel dataGRBG,SGRBG8: GR,BG bayer pixel dataGBRG,SGBRG8: GB,RG bayer pixel dataBGGR,SBGGR8: BG,GR bayer pixel data
π« 10-bit bayer formatted data. transmitted as 16-bit format in 8 bytes:
RG10,SRGGB10: RG,GB bayer pixel dataBA10,SGRBG10: GR,BG bayer pixel dataGB10,SGBRG10: GB,RG bayer pixel dataBG10,SBGGR10: BG,GR bayer pixel data
π« 10-bit bayer formatted data packed into 5 bytes, this matches with MIPI RAW10:
pRAA,SRGGB10P: RG,GB bayer pixel datapgAA,SGRBG10P: GR,BG bayer pixel datapGAA,SGBRG10P: GB,RG bayer pixel datapBAA,SBGGR10P: BG,GR bayer pixel data
π« 12-bit bayer formatted data, transmitted as 16-bit format in 8 bytes:
RG12,SRGGB12: RG,GB bayer pixel dataBA12,SGRBG12: GR,BG bayer pixel dataGB12,SGBRG12: GB,RG bayer pixel dataBG12,SBGGR12: BG,GR bayer pixel data
π« 12-bit bayer formatted data packed into 6 bytes, this matches with MIPI RAW12:
pRCC,SRGGB12P: RG,GB bayer pixel datapgCC,SGRBG12P: GR,BG bayer pixel datapGCC,SGBRG12P: GB,RG bayer pixel datapBCC,SBGGR12P: BG,GR bayer pixel data
π« 16-bit bayer formatted data:
RG16,SRGGB16: RG,GB bayer pixel dataGR16,SGBRG16: GR,BG bayer pixel dataGB16,SGBRG16: GB,RG bayer pixel dataBYR2,SBGGR16: BG,GR bayer pixel data
π EXPOSURE PROGRAMS π
The defined exposure programs in the DNG specification are:
0: Undefined exposure program (default)1: Full manual program2: Full auto program3: Aperture priority4: Shutter priority5: Creative program6: Action program (fast shutter)7: Portrait program (Large aperture)8: Landscape program (Small aperture)
ok that's literally the whole page bestie, go make some DNGs, you got this π«Ά
makedng π version stamped 2025-11-11, and yeah the footer says makedng(1) again because it's iconic like that. mwah π periodt.
π¦ where this page comes from
- ubuntu resolute: libdng-utils 0.2.2-1 Β· MIT
- ubuntu stonking: libdng-utils 0.2.2-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms