Skip to content

Conversation

@Blackhart
Copy link

@Blackhart Blackhart commented Oct 25, 2025

Add OpenImageIO Media Reader Plugin for xStudio

linked ticket: #98

Summarize your change

This PR adds a new media reader plugin using OpenImageIO (OIIO).

Describe the reason for the change

xStudio currently supports only video, OpenEXR, and PPM image formats, and lacks support for common formats such as PNG, JPEG, and TIFF.

By integrating OpenImageIO, we can now read all image formats supported by OIIO without requiring specific implementations for each one.

These changes add support for:

  • Various bit depths (8-bit, 16-bit, half-float and float32)
  • RGB, RGBA, Grayscale, and Grayscale + Alpha images

Describe what you have tested and on which operating system

Testing Environment:

  • OS: Linux (Ubuntu 24.04, kernel 6.14.0)
  • Build Configuration: Debug and Release modes
  • Compiler: GCC 13.2.0 with C++17

Tests done manually:

  • Read jpeg rgb 8 bits
  • Read png rgb 8 bits
  • Read png rgba 8 bits
  • Read png grayscale 16 bits
  • Read png rgb 16 bits
  • Read tiff rgb 16 bits
  • Read openexr rgb float
  • Read openexr rgb half

Add a list of changes, and note any that might need special attention during the review

  • src/plugin/media_reader/openimageio/src/openimageio.cpp:
  • src/plugin/media_reader/openimageio/src/openimageio.hpp
  • src/plugin/media_reader/openimageio/CMakeLists.txt
  • src/plugin/media_reader/openimageio/test/openimageio_test.cpp
  • vcpkg.json -- I'm not using vcpkg to build xstudio, need special attention there

pleprince and others added 7 commits August 22, 2025 15:08
…f the build directory.

Signed-off-by: Philippe Leprince <[email protected]>
Configure proper rpath settings for macOS app bundles to ensure
dynamic libraries are correctly located at runtime. This includes
setting INSTALL_RPATH and using install_name_tool to fix library
paths in both the app bundle and executable.

Added a new CMake script to automatically fix library paths after
build and updated macdeployqt integration to handle rpath changes
for libglobal.dylib.

Signed-off-by: Philippe Leprince <[email protected]>
…e wheel with shift modifier.

- When using a mouse on MacOS laptops with trackpads, wheel.angleDelta.y always returns 0 when SHIFT is pressed, but the x component changes instead. Use x if y is 0 to enable zooming.
- Note that the scrolling trackpad gesture changes the y value as expected. This change handles both cases.
- Also limit scaleY between 0.6 and 2.0 to prevent unusable values.

Signed-off-by: Philippe Leprince <[email protected]>
…ylib-rpath-in-mac-os-app-bundles

146: Resolve dylib rpath issues in MacOS app bundles
…mySoftwareFoundation#148-macos-timeline-sfift-scrollwheel-fix

148: fix timeline zoom behavior on MacOS laptops
…x/annotation-tools

Fixes Drawing Annotation Tools
@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Oct 25, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@Blackhart Blackhart force-pushed the feature/implement-oiio-reader branch 4 times, most recently from 8e71ee7 to fa826de Compare October 25, 2025 00:42
@Blackhart
Copy link
Author

Blackhart commented Oct 25, 2025

There is a limitation in my current implementation.
It requires all image channels to have the same pixel format (e.g., all UINT8, all UINT16, all HALF, or all FLOAT). Mixed-format channels within a single image are not currently supported. This is consistent with most common image formats but may not handle certain exotic multi-format images that OpenImageIO itself can read.

This limitation could be addressed in future iterations if use cases requiring mixed-format channels are identified.

@Blackhart Blackhart mentioned this pull request Oct 29, 2025
@Blackhart Blackhart force-pushed the feature/implement-oiio-reader branch from 95a3f56 to bcf1d4c Compare October 29, 2025 17:12
Signed-off-by: Thomas Manceau <[email protected]>
@Blackhart Blackhart force-pushed the feature/implement-oiio-reader branch from bcf1d4c to 89d26ca Compare October 29, 2025 17:14
Signed-off-by: Thomas Manceau <[email protected]>
@Blackhart Blackhart force-pushed the feature/implement-oiio-reader branch from 89d26ca to 3ec87e3 Compare October 29, 2025 17:16
@tedwaine
Copy link
Contributor

Thanks so much for this!

I will test this on Mac & Windows.

},
{
"name": "openimageio",
"version": "2.5.19.1"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

VCPKG doesn't seem to have a port for this version. I changed this to "2.5.16.0#1" which looks like the latest version (v2) available. It then builds and runs ok.

https://vcpkg.io/en/package/openimageio

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm working on a CMake superbuild script.
This script downloads dependencies from GitHub, archives, or other sources, builds them for the target platform, and links them into xstudio.

It could be a great addition for anyone who doesn’t use vcpkg, or when vcpkg doesn’t provide the required version.

@tedwaine tedwaine force-pushed the develop branch 3 times, most recently from 4b886d5 to 8cde0df Compare November 21, 2025 15:39
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.

3 participants