Skip to content

fix(oiio): don't advertise HEIC/HEIF as writable without an HEVC encoder #79

Description

@mcoliver

Summary

IOoiio advertises HEIC/HEIF (heic, heif, hif) as writable whenever OpenImageIO has a heif output plugin. But writing HEIC needs an HEVC encoder, which our Windows dependencies deliberately don't include (no x265; see AGENTS.md §1.4). So on Windows utvio -formats lists HEIC as (Read, Write) and the write then fails with OIIO: Unable to open "...heic" for writing: Unknown error (#67).

Proposal

  • When the plugin loads, find out whether HEVC encoding is actually available. For example, do a one-time 1×1 write of a HEIC image to a temporary file, or query libheif directly (heif_have_encoder_for_format(heif_compression_HEVC)) if we link it. Register heic/heif/hif as read-only if not.
  • AVIF (avif) uses the AV1 encoder and should stay writable when available; probe it separately.
  • Then drop the heic/heif/hif Windows xfail entries in src/test/CliSmokeTest/format_roundtrip.py. The test only round-trips formats advertised as writable.

Related: #67, AGENTS.md §1.4.

Code of Conduct

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions