Repository navigation
Flags Reference
Complete switch catalogue. Bare -v output stays byte-exact to the original
except the estimated FNumber; every refinement is opt-in. Defaults shown are
the tool's built-in values.
These eleven are the original tool's complete flag set (-c works in the
original even though its v1.20 usage banner omits it). The official droplets
default to -b -p -v -r -c (Windows) and -v -r -b -p (Mac).
| Flag | Meaning |
|---|---|
-i <path> |
input file or folder (default: current folder) |
-o <path> |
output folder (default: alongside the input) |
-v |
verbose |
-r |
refresh: overwrite existing DNGs |
-b [val] |
write a BlackLevel tag (default 92); raise to cure magenta shadows, lower to cure green. Tag only - pixels untouched. m8raw2dng2 writes a flat value at every ISO and gain-scales it only under -s; the original's -b writes base_black x ISO gain (so they agree at base ISO and under -s -b, and diverge under plain -b at high ISO). See Fidelity. |
-p |
embed the full-resolution camera JPEG as the DNG preview |
-c |
use the M9 ("M8RAW") colour matrices instead of the M8 ones. Exactly two changes: the Model tag becomes "M8RAW Digital Camera" (UniqueCameraModel stays "M8 Digital Camera") and ColorMatrix1/2 swap to the M9 set; illuminants (StdA/D65) and CameraCalibration are unchanged. Byte-identical to the original's -c. |
-l [6bitcode] |
apply lens EXIF from lensdb.ini; optional forced 6-bit code |
-s |
apply sensor fixes (darkfield + line repair) from sensdb.ini
|
-sd |
create/update the sensor darkfield (one frame, or a whole folder) |
-st |
sensor test: paint configured/auto-detected bad columns white (for verifying defect-line coordinates by eye before -s removes them). The original has no Line writer, so its defect lines are hand-entered as four separate Line = keys; m8raw2dng2 auto-detects them with --auto-lines. See Databases. |
| Flag | Meaning |
|---|---|
-A, --aperture F
|
force the EXIF FNumber to f/F (otherwise estimated). Yields a bit-identical DNG. |
--calibrate-fnumber AP[,AP...] |
calibration mode: derive this body+lens's aperture-meter offset from known-aperture frames and store it in sensdb.ini (MeterOffset.<lenscode> under [serial]). Apertures must match input frames in filename order. 5-10 frames, once per (body, lens). See The Math. |
--mimic-fnumber |
estimate FNumber the original tool's (compressed) way; less accurate, base-ISO only |
--legacy-fnumber |
ignore both light meters when estimating FNumber (image-brightness constant only). For reproducing pre-2.8 output, or files with no Leica MakerNote. |
--selfcal |
opt into batch self-calibration of the aperture-meter offset from the camera's own ApproxF over a >=8-frame batch. Off by default (batch-dependent). A stored MeterOffset is always preferred. |
--auto-lines |
-sd: also detect bright/defect columns, zero them in LevelCorrection, record them as Line entries. -s then neighbour-interpolates each. Off by default. |
--auto-repair |
-s: also re-detect defect columns per image. Dark / calibration frames only - on a lit photo it reads scene structure as "defects" and smears real columns (the tool warns past a handful). Stored Line entries are always repaired regardless, so normal shots need only plain -s. |
-R, --recursive
|
walk sub-folders |
-j, --jobs N
|
convert N files in parallel |
--dry-run |
list what would be done, write nothing |
--probe [PATH] |
report a .RAW/.DNG file's geometry (or every such file in a folder), then exit |
--db-dir DIR |
folder holding lensdb.ini / sensdb.ini (default: next to the script) |
--cfa PHASE |
Bayer phase RGGB|BGGR|GRBG|GBRG (default RGGB) |
--no-crop |
mark DefaultCrop as the full 3968x2646 frame (incl. the 2px edge) so ACR/Photoshop open uncropped. Default crops to 3964x2642, matching the reference tool. Pixels identical either way - the two outputs differ by exactly 4 bytes (the DefaultCrop tag values). m8raw2dng2-only: the original has no such flag and silently ignores it. |
--legacy-preview |
emit the standard in-camera M8 DNG layout (use with -p): a sharp 3:2 JPEG preview in IFD0, raw CFA in a SubIFD. Fixes macOS Finder / QuickLook thumbnails, keeps files small. Raw pixels identical either way. |
--preview-size N |
long edge in px of the --legacy-preview image (default 1024, 3:2) |
--preview-uncompressed |
embed the preview as uncompressed RGB instead of JPEG (much larger; only if a reader dislikes the JPEG) |
--verify |
re-read each DNG after writing and self-check its structure; reports PASS / FAIL with a check count. Checks: TIFF header, IFD0 readable, tags ascending, DNGVersion, raw CFA IFD located, width/height, 16-bit, uncompressed, strip length and in-bounds, WhiteLevel, CFAPattern, AsShotNeutral - plus BlackLevel (with -b) and the preview IFD (with --legacy-preview). 14 checks plain, up to 17 with -b and --legacy-preview. |
| Flag | Meaning |
|---|---|
--white N |
white / ADC ceiling (default 16383) |
--raw-offset N |
header samples to skip in the RAW (default 54) |
--raw-endian E |
little|big (default little) |
--log [FILE] |
also write a log file (conversion, --verify, --probe output); FILE optional, auto-named if omitted |
--version |
print version and exit |
The GUI (GUI) exposes the everyday and refinement flags: -i -o -v -r -b -p -c -l -s -sd -A -R -j, --calibrate-fnumber, --auto-lines, --selfcal,
--mimic-fnumber, --legacy-fnumber, --no-crop, --cfa, --legacy-preview,
--preview-size, --preview-uncompressed, --verify, --dry-run, --probe and
--log.
These advanced flags are command-line (or launcher) only, not in the GUI:
| Flag | Why CLI-only |
|---|---|
-st |
sensor-test / defect-line placement, a diagnostic step |
--auto-repair |
per-image re-detection during -s
|
--db-dir |
relocate the INI files |
--white |
ADC ceiling override |
--raw-offset |
RAW header-sample override |
--raw-endian |
RAW endianness override |
--version |
prints and exits |
Anything the GUI can do, the CLI can do; the reverse is not quite true.