A focused, non-destructive Windows editor for Nikon D3 .NEF photographs.
The same adjustment engine is used by the visible controls and by a bounded
local Codex MCP server.
- Nikon D3 NEF decoding through LibRaw/rawpy
- Fast half-resolution previews and full-resolution export
- Exposure, brightness, contrast, highlights, shadows, and saturation
- Luminance-based auto contrast
- Camera, automatic, daylight, and manual white balance
- Manual color temperature and green/magenta tint
- Independent red, green, and blue lift/gamma/gain controls
- Per-channel histogram and clipping information
- Non-destructive JSON sidecars; source photographs are never overwritten
- JPEG and 16-bit TIFF export
- Active-photo-only Codex tools with reversible changes
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\.venv\Scripts\d3raw-editor.exeYou can also launch with:
.\.venv\Scripts\python.exe -m d3raw_editor.appThe editor writes only the currently open photograph to a small local session record. The MCP server can operate on that active photograph; it does not provide arbitrary file browsing.
The repository includes this portable project-scoped .codex/config.toml.
Trust and open the project in Codex:
[mcp_servers.d3raw]
command = "powershell"
args = ["-NoProfile", "-ExecutionPolicy", "Bypass", "-File", "scripts\\mcp.ps1"]
cwd = "."
default_tools_approval_mode = "writes"
enabled = trueRestart the Codex client after adding the server. Read operations can inspect the current adjustments, histogram, and preview. Write operations change only the sidecar or create a new export.
Camera and auto modes use LibRaw's camera-aware white-balance processing. Daylight uses LibRaw's daylight default. Manual temperature uses a Bradford chromatic-adaptation approximation in linear sRGB after daylight decoding. This is useful for a prototype and creative grading, but it is not intended to match Nikon NX Studio's proprietary rendering pixel-for-pixel.
- Adjustments:
<photo>.NEF.d3raw.json - Active session:
%LOCALAPPDATA%\D3RawEditor\active-session.json - Exports: always new
.jpgor.tiffiles - The application refuses to overwrite a source or an existing export