Skip to content

feat(heic): probe for an HEVC encoder and export HEIC through OS encoders - #84

Merged
mcoliver merged 2 commits into
mainfrom
feat/heic-encoder-probe-and-os-export
Oct 2, 2026
Merged

mcoliver merged 2 commits into
mainfrom
feat/heic-encoder-probe-and-os-export

Conversation

@mcoliver

@mcoliver mcoliver commented Oct 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

OpenUTV ships no HEVC encoder (AGENTS.md §1.4). This makes HEIC behave correctly within that policy.

#79: don't advertise HEIC write without an encoder

  • IOoiio test-encodes a small HEIC and AVIF image when it loads, and registers the format as read-only if that fails. OIIO's output_format_list only says libheif is present, not that it has an encoder.
  • GenericIO::findByExtension now checks the real plugin's capabilities after loading it from the formats cache and keeps looking if it supports less. The cache is made on the build machine, so before this a stale "Write" entry would route the write to a plugin that cannot do it.

#81: HEIC export through OS encoders

  • macOS: IONSImage writes heic / heif / hif through ImageIO with Apple's encoder; 10-bit for sources deeper than 8 bits. IOoiio keeps HEIC read-only on macOS so writes route here.
  • Windows: new IOwic plugin (io_wic.dll) writes HEIC through WIC, using the encoder from Microsoft's "HEIF Image Extensions" and "HEVC Video Extensions". 8-bit only. Without the extensions the write fails with a message naming what to install.
  • IOwic always advertises Write, unlike the proposal in feat: HEIC/HEIF export via OS encoders (macOS ImageIO, Windows WIC) #81: the formats cache is built on the CI machine, so a probe there would hide the writer from every user.

#80: Windows HEIC decoding

The issue assumed Windows could not read HEIC. The OpenUTVDeps-26.5 installer does contain libde265.dll (the vcpkg libheif port depends on it unconditionally) and no x265. The round-trip test now decodes a committed 595-byte HEIC sample on every platform, so Windows CI shows whether reading works. No dependency change is made here.

Verification

  • macOS: heic, heif, hif, avif round-trip; the sample decodes; output files are 10-bit HEVC (sips); 121/121 tests pass.
  • Not verified locally: the IOoiio HEIC probe (Linux and Windows only) and everything in IOwic. Windows CI compiles IOwic and exercises its "encoder not installed" path. The successful WIC encode has not been run anywhere and needs a Windows machine with both Store extensions.

Refs #79, #80, #81

🤖 Generated with Claude Code

…ders

OpenUTV ships no HEVC encoder (AGENTS.md 1.4), so writing HEIC through
OpenImageIO only works where the user's libheif has one.

- IOoiio test-encodes HEIC and AVIF when it loads and registers them as
  read-only if the encoder is missing, instead of trusting OIIO's output
  format list (#79).
- macOS: IONSImage writes HEIC through ImageIO with Apple's encoder, 10 bit
  for sources deeper than 8 bit. IOoiio keeps HEIC read-only on macOS (#81).
- Windows: new IOwic plugin writes HEIC through WIC with the encoder from
  Microsoft's HEIF and HEVC Video Extensions. Without them the write fails
  with a message naming what to install (#81).
- GenericIO::findByExtension checks the real plugin's capabilities after
  loading it from the formats cache, and keeps looking if it supports less
  on this machine.
- The round-trip test decodes a committed HEIC sample on every platform,
  which shows whether Windows can read HEIC with the bundled libde265 (#80),
  and reports a missing user-installed encoder as a skip.

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

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Michael Oliver <mcoliver@gmail.com>
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.

1 participant