Skip to content

Fix Python Support For Image Loaders #60

Closed
kwokcb wants to merge 4 commits intomainfrom
python_image_loader_fix
Closed

Fix Python Support For Image Loaders #60
kwokcb wants to merge 4 commits intomainfrom
python_image_loader_fix

Conversation

@kwokcb
Copy link
Copy Markdown
Owner

@kwokcb kwokcb commented Sep 3, 2025

Changes

  • Patches to make image loaders declared in Python to work properly.
    • Fixes image data passing (void*) cannot resolve properly.
    • Virtualize extension support query and pass by reference to get data returned properly.
    • Add in trampoline classes so that derived classes get called properly
    • Fix missing type enumerations in pybind bindings.

Tests

  • Sample OIIO Loader test added along with sample image from OpenEXR tests
    • Registers the custom load with ImageHander interface
    • Calls aquireImage which will check extensions EXR is not by default supported so will find the sample OIIO loader
    • Calls virtual loadImage override. Also displays the image using matplotlib if available
    • The MaterialX Image is cached in memory after load.
    • Calls saveImage on the ImageHandler passing the MaterialX Image which will again check extensions and call back to the OIIO loader.
    • Calls saveImage override. Also displays the imsage using matplotlib if available.

Results:

  • EXR Image loaded
image
  • EXR Image saved
image

@kwokcb kwokcb closed this Sep 3, 2025
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