Skip to main content

Fast IIQ converter for Phase One iXM-GS120 (120MP) raw images

Project description

iiq2img

Fast converter for Phase One iXM-GS120 (120 MP) IIQ raw files. Outputs JPEG, PNG, or TIFF with full EXIF/GPS/XMP metadata and optional georeferencing.

Quick start

# Install from PyPI
pip install iiq2img

# Or install the latest dev version from git
uv pip install git+https://github.com/DPIRD-DMA/iiq2img.git

# Or clone and install locally
git clone https://github.com/DPIRD-DMA/iiq2img.git && cd iiq2img
uv sync

# Convert (uses fast pipeline by default)
iiq2img photo.IIQ                     # single file
iiq2img batch ./raw ./out             # batch directory
iiq2img photo.IIQ --libraw            # use LibRaw PPG instead

Pipelines

Pipeline End-to-end Speedup Quality
default (fast) ~1.0 s 3.6x Mean diff ~7/255 vs reference
--libraw (LibRaw PPG) ~3.3 s baseline Reference

The fast pipeline uses cv2 edge-aware demosaic + numba parallel LUTs with BT.709 gamma, matched to LibRaw's output. See FINDINGS.md for how.

Python API

from iiq2img import convert_iiq, read_iiq, batch_convert

# Single file (fast pipeline is the default)
out_path = convert_iiq("photo.IIQ", "output.jpg")

# Read as NumPy array (no file written)
rgb = read_iiq("photo.IIQ")

# Batch (parallel)
results = batch_convert("./raw", "./out", workers=8)

# Georeferenced output (requires `pip install iiq2img[geo]`)
# TIFF: CRS embedded in the GeoTIFF itself.
# JPEG/PNG: sidecars written next to the image (.jgw/.pgw + .prj + .aux.xml)
# so QGIS/ArcGIS recognise the projection.
convert_iiq("photo.IIQ", "output.tif", output_format="tiff", georef=True)
convert_iiq("photo.IIQ", "output.jpg", georef=True)
Option Default Description
thumbnail False Extract embedded JPEG thumbnail instead of converting
output_format "jpg" Output format: jpg, png, or tiff
compress_quality 90 JPEG/PNG compression quality (1-100)
max_dimension None Downscale longest edge to this size
rotate 0 Rotate output: 0, 90, 180, 270
georef False World file + .prj + .aux.xml sidecars for JPEG/PNG, embedded CRS for TIFF (requires [geo] extra)
extract_meta True Copy EXIF/GPS/XMP metadata to output
pipeline "fast" Demosaic pipeline: fast or libraw

CLI

# Single file (outputs photo.jpg next to the original)
iiq2img photo.IIQ
iiq2img photo.IIQ --libraw            # use LibRaw PPG instead of fast

# Batch convert a directory (parallel)
iiq2img batch ./raw ./out                           # defaults: jpg, q=90, fast
iiq2img batch ./raw ./out --format tiff --workers 8 # tiff, q=90, 8 workers
iiq2img batch ./raw ./out --format jpg --quality 75 --workers 4 --libraw
iiq2img batch ./raw ./out --georef                  # write georef sidecars for every output
iiq2img batch ./raw ./out --rotate 180 --no-meta    # 180° flip, skip EXIF copy

# Benchmark all pipelines on a sample file
iiq2img benchmark photo.IIQ

Changelog

See CHANGELOG.md for version history.

Contributing

git clone https://github.com/DPIRD-DMA/iiq2img.git && cd iiq2img
uv sync --dev
pre-commit install

Pre-commit hooks run ruff (lint + format) and pytest on every commit. To run them manually:

uv run ruff check .                  # lint
uv run ruff format .                 # format
uv run pytest                        # tests
uv run iiq2img benchmark photo.IIQ   # timing comparison

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iiq2img-0.6.0.tar.gz (2.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

iiq2img-0.6.0-py3-none-any.whl (22.8 kB view details)

Uploaded Python 3

File details

Details for the file iiq2img-0.6.0.tar.gz.

File metadata

  • Download URL: iiq2img-0.6.0.tar.gz
  • Upload date:
  • Size: 2.0 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iiq2img-0.6.0.tar.gz
Algorithm Hash digest
SHA256 3b11ddb02b90bd0c5c9950cc7bbbb837f2ffd51906d1881c163139e04771de67
MD5 ed48a35a4f5290185f275bd4db49f15c
BLAKE2b-256 4eeb9b3d546dd3b5815cabfcd6dfd3e21e22acfd1e7f8f52383af2a42888afb3

See more details on using hashes here.

Provenance

The following attestation bundles were made for iiq2img-0.6.0.tar.gz:

Publisher: publish.yml on DPIRD-DMA/iiq2img

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file iiq2img-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: iiq2img-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 22.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for iiq2img-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8ea7cf1d003de9b0d5a4bf100e19e307883454b104fab50d421dcb8faff54b22
MD5 f678d4575d896942fa8b0632e4e8f820
BLAKE2b-256 9438d222587bc5f968834145c096bebecb2e3763031e2c13bc196366403f5cd3

See more details on using hashes here.

Provenance

The following attestation bundles were made for iiq2img-0.6.0-py3-none-any.whl:

Publisher: publish.yml on DPIRD-DMA/iiq2img

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page