Skip to content

fix: resolve Windows CLI dependencies and implement OIIO image writing - #63

Merged
mcoliver merged 5 commits into
mainfrom
fix/windows-deps-and-oiio-write
Sep 30, 2026
Merged

mcoliver merged 5 commits into
mainfrom
fix/windows-deps-and-oiio-write

Conversation

@mcoliver

@mcoliver mcoliver commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #58 (Windows CLI tools can't find their dependencies). Fixes #59 (utvio fails to write PNG/DPX/WebP/QOI with a blank ERROR:).

#58: Windows dependency resolution

  • install.ps1: configures the OpenUTVDeps runtime (bin, bundled Python, PySide6/Qt plugins) and sets UTV_DEPS_ROOT/OPENUTV_DEPS_ROOT, PYTHONHOME and QT_PLUGIN_PATH.
  • No global PATH changes: the runtime environment is isolated. .cmd wrappers (utvio, utvls, utvpkg, py-interp, openutv-run, openutv-diagnostics, openutv-check-updates) find the dependencies and set up the environment for each process.
  • UTVLauncherWin.cpp: hardened dependency discovery.
  • Qt 6 plugins: removed the legacy Windows qt.conf that blocked Qt 6 plugin resolution.
  • macOS:
    • UTVLauncher honors UTV_DEPS_ROOT, OPENUTV_DEPS_ROOT and HOMEBREW_PREFIX, exports UTV_HOME/UTV_DEPS_ROOT, and adds a --run <tool> mode.
    • The .sh wrappers pick up the Homebrew environment.
  • Env var names: UTV_* names take precedence, with OPENUTV_* still honored as a fallback (UTV_HWACCEL, UTV_KEYBINDINGS_FILE, UTV_DEPS_ROOT).
  • openutv-diagnostics: adds --help and --silent.

#59: OIIO image writing

  • Routing: formats with dedicated native writers (png, dpx, cin, jpg, tga, rla, hdr) are registered read-only in IOoiio, so writes go to io_png, io_dpx, etc.
  • New writer: IOoiio::writeImage is implemented (it was a stub that threw an empty exception). It handles planar merge, colorspace conversion, orientation, channel names, pixel aspect, compression and quality.
  • Only real writers advertised: IOoiio asks OIIO which formats this build can actually write. Homebrew's OIIO has no QOI or DDS writer, so those are now read-only.
  • OIIO writer quirks handled:
    • Alpha is dropped for writers that can't store it (PNM).
    • PNM gets integer samples: with float data OIIO silently writes a bottom-to-top PFM, even under a .ppm name.
    • FITS gets FLOAT instead of HALF, working around an OIIO bug (still on OIIO main) that writes truncated files.
  • Error messages: unsupported read/write errors now name the plugin and the extension.

Build

  • formats.gto and movieformats.gto are now regenerated when a format plugin is relinked. Previously incremental builds kept a stale capability cache, which made plugin changes appear not to work.

Verification (macOS, Apple Silicon)

  • The exact repro from fix: utvio fails to write PNG, DPX, WebP and QOI (blank "ERROR:", exit code 255) #59 works: png, dpx and webp exit 0.
  • An asymmetric test image round-trips with correct orientation and values through png, dpx, webp, bmp, heic, avif, jxl, sgi, fits, ppm, tif, exr, jpg, tga, cin, hdr and iff. QOI and DDS are refused with a clear message.
  • The launcher's --run mode, openutv-diagnostics --help and the env var fallbacks all checked.
  • Branch CI passes on macOS, Windows and Linux.

QA

Follow-up: #60's smoke suite is stacked on this branch in a separate draft PR.

🤖 Generated with Claude Code

…iting (fixes #58, fixes #59)

- Fixes #58: Configure OpenUTVDeps bin, python, and PySide6 directories in PATH and set OPENUTV_DEPS_ROOT, PYTHONHOME, QT_PLUGIN_PATH, and QT_QPA_PLATFORM_PLUGIN_PATH in install.ps1. Auto-discover dependencies and configure environment in openutv-diagnostics.cmd and openutv-check-updates.cmd. Remove obsolete legacy qt.conf that blocked Qt 6 plugin resolution. Add --help and --silent support to openutv-diagnostics.py.
…nd add hermetic CLI shims for Windows and macOS
…e formats

- Replace non-existent APIs in IOoiio::writeImage: FrameBuffer::pixelAspect()
  -> pixelAspectRatio(), FrameBuffer::data<void>() -> pixels<unsigned char>(),
  ImageSpec::pixelaspect -> "PixelAspectRatio" attribute.
- Query OIIO's output_format_list / extension map at plugin construction and
  only register Write for extensions that have an OIIO writer in this build.
  Homebrew's OIIO has no QOI or DDS writer, so these are now Read-only and
  utvio reports "No plugins support (write) format" instead of failing inside
  the OIIO plugin.
- Correct plugin identifiers in the native-writer comment.

Refs #59

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
formats.gto and movieformats.gto were generated by custom commands that
only depended on the image_formats/movie_formats utility targets. Utility
target dependencies order the build but do not trigger re-runs, so an
incremental build kept stale plugin capabilities after a plugin changed,
and GenericIO routed reads/writes based on outdated information.

rv_stage now records each IMAGE_FORMAT/MOVIE_FORMAT plugin's output file
on the aggregate target, and the cache generators depend on those files.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
- Drop a trailing alpha channel when the OIIO writer does not support
  alpha (PNM), instead of failing with "pnm does not support 4-channel".
- Write integer samples for PNM: OIIO's PNM writer emits bottom-to-top PFM
  for any floating point spec regardless of extension, which produced
  vertically flipped .ppm/.pgm files from float frame buffers.
- Promote HALF to FLOAT for FITS: OIIO writes BITPIX=-32 for HALF but still
  writes 16-bit samples, producing a truncated, unreadable file (still
  present on OIIO main).
- Install the temporary FrameBuffer cleanup guard before any conversion so
  intermediates are not leaked if a conversion throws.
- Check ImageOutput::close() and report its error.

Refs #59

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
@mcoliver
mcoliver marked this pull request as ready for review September 30, 2026 15:33
@mcoliver
mcoliver merged commit b2393db into main Sep 30, 2026
8 of 13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

fix: utvio fails to write PNG, DPX, WebP and QOI (blank "ERROR:", exit code 255) fix: utvpkg fails to find dependencies on Windows 11

1 participant