Py-Chrome V9 is a desktop tool for IR photo conversion and analysis made to emulate CIR, formally known as Aerochrome. It provides a live preview pipeline, white-balance tools, scatter/histogram diagnostics, preset management, and export options from a DearPyGui interface.
A Full Spectrum Camera with a Yellow 12 at the least is required to use this program
This project is now modular:
- app.py: application entrypoint and callbacks
- ui.py: DearPyGui layout and widget creation
- processing.py: image math, rendering helpers, histogram/scatter processing
- io_ops.py: image load/save logic and format handling
- presets.py: preset file operations
- state.py: shared constants and app state
- Py-Chrome V9_8.py: compatibility launcher that calls app.main()
- Install Python (https://www.python.org/downloads/)
- Download all contents and place all .py files together in a folder
- Right-click
installer.pyand open with Python Launcher - The finished application package is created in:
release/PyChromeV9- plus a ZIP in
release/(unless--no-zipis used)
- Optional: Delete all source code and use the exported application
-
Upgrade pip: python3 -m pip install --upgrade pip
-
Install required packages: pip install numpy pillow dearpygui tifffile
-
Run the app: app.py
Required:
- numpy Why: core array math for per-pixel processing, histogram/scatter data prep.
- pillow Why: image loading/resizing and non-TIFF export support.
- dearpygui Why: desktop UI toolkit used for all controls, plots, and image textures.
Strongly recommended:
- tifffile Why: enables high-precision TIFF load/save and 16-bit TIFF export path.
Optional (build only):
- pyinstaller Why: creates standalone executable distributions.
Run from source:
- python3 app.py
Build standalone executable (example):
- python3 -m PyInstaller --noconfirm --clean --onefile --windowed --name "PyChromeV9" --collect-all dearpygui --collect-all PIL app.py
Current build outputs (if already built):
- dist/PyChromeV9
- dist/PyChromeV9.app
Note on presets path:
- Source run: presets are stored in ./presets relative to the project.
- Frozen executable: presets are stored next to the executable in a presets folder.
-
Open image file What: loads TIFF/JPG/PNG sources and prepares full-resolution + preview arrays. Why: gives fast interactive edits while preserving full-res data for export.
-
Save with selectable output format What: export as TIFF, JPEG, PNG, or BMP (TIFF shown only when TIFF source is loaded). Why: supports common delivery formats while protecting TIFF-specific workflows.
-
White Balance dropper + sliders What: click a neutral area to estimate WB temperature/tint, or adjust manually. Why: IR conversions are highly WB-sensitive; this speeds accurate color setup. The WB affects the image BEFORE conversion
-
Fraction controls (Red/Green visible fractions and IR fraction) What: tunes channel contribution to the scientific IRG transform. Why: gives control over channel separation and highlight behavior. The smaller the fraction of visible light, the greater the subtraction and saturation
Note: Low Visible Channel fraction can cause artifacting in highlights
-
Gamma and exposure controls What: adjust per-channel gamma response and global exposure. Higher Gamma = Decrease in brightness & Vice Versa Why: provides tonal shaping and dynamic-range balancing in output.
-
Gamma Red/Green Visible What it does: Affects overall brightness of that specific channel globally
-
Gamma Red/Green IR What it does: Affects brightness of channel in areas where subtraction takes place (e.g foilage)
Example 1: To get crimson red foilage, increase Gamma Red and Green IR to decrease brightness in foilage area. Adjust Gamma Visible slightly if needed to re-balance overall color

Example 2: To extract color variation from foilage, increase Gamma in Red and Green IR while decreasing Gamma in the Red and Green Visible
-
- Gamma IR
What it does: Affects IR channel brightness; Red and Green channel compensated automatically
Example: Increasing Gamma IR decreases IR channel brightness while increasing both Red and Green channel equally - useful for minor refinement
-
Scientific IRG transform What: converts preview/full image using the IRG model equation. Why: core algorithm for the Aerochrome-style conversion workflow.
Simplified Equation Example:
[R] = [R + IR] - [IR]
[G] = [G + IR] - [IR]
Note: Because we do not exactly know how much IR contaminates the Red and Green channel, it is best to treat this as visual aesthetic per scene rather than attempting to be "Correct"
-
Main preview + before/after channel tiles What: shows transformed preview plus channel-level mini-previews. Why: makes it easier to debug channel behavior and tune settings quickly.
-
Histogram with visual gain What: displays per-channel frequency with adjustable visual gain. Why: helps detect clipping/distribution issues while keeping normalization stable.
-
Scatter plots (before/after mode) What: plots channel relationships in fixed order with optional converted/source mode. Why: gives quick diagnostics for channel separation and transform response.
-
Presets (save/load/delete/overwrite confirmation) What: stores slider states to JSON in presets folder; confirms overwrite. Why: enables repeatable looks and safer preset management.
-
Reset to default What: restores all tuned parameters to known defaults. Why: allows quick recovery from extreme settings during experimentation.
-
Performance optimizations What: numpy texture uploads, cached scatter sampling, vectorized histogram fill, single-pass channel preview resize, label-update guard. Why: keeps UI interaction responsive during frequent slider updates.
Use this sequence for effective and consistent results:
- Open one representative image from your session.
- Set WB using "Set WB Reference" and click a neutral area.
- Fine-tune WB sliders manually if needed.
- Tune fraction sliders (
fracRx,fracGx,fracBY) first. - Tune gamma sliders second for tonal shaping.
- Tune exposure last.
- Watch histogram for clipping patterns.
- Check scatter plots for channel separation behavior.
- Save preset with a session-specific name.
- (If starting a new session again after close) Load next image and apply same preset.
- Adjust only WB/exposure per image if capture conditions drifted.
- Export to final format.
Issue: The Open File box does not appear
- Cause: The Open File is behind the main interface
- Action: Top left of the window, next to Py-Chrome text, click on window to minimize main window to see open file box or other dialogue
Issue: TIFF export not available.
- Cause: Source file is not TIFF, or save option not applicable.
- Action: Load a TIFF source file if you need TIFF output.
Issue: TIFF export works but appears 8-bit.
- Cause:
tifffilemissing or failed, fallback path used. - Action:
Reinstall
tifffilein active environment.
Issue: Image loads but colors look wrong immediately.
- Cause: WB not neutralized before transform tuning.
- Action: Use WB dropper first, then retune fractions/gamma.
Issue: Scatter seems noisy.
- Cause: Large scene variance + capped random sample.
- Action: Compare with a cleaner reference image and keep consistent preset baseline.
Issue: Preset missing from dropdown.
- Cause: file removed/renamed or invalid path state.
- Action:
Press Refresh; verify file exists in
presetsfolder.
Additional editing done in Lightroom
MIT






