AcademySoftwareFoundation / AcademySoftwareFoundation/OpenImageIO

[FEATURE REQUEST] Python Bindings: Support for Pickling

Open
#2,534 4 comments 0 reactions 0 assignees View on GitHub
good first issue python
Dominant language
C++
Stars
2.4k
Forks
698
Avg merge
3d 9h
Merged PRs (30d)
48

Description

It seems that pickling support is required for easily using ImageBuf / ImageSpec objects in multiprocessing in python. Therefore it would be great if pickling support could be added to them along these lines:
https://pybind11.readthedocs.io/en/stable/advanced/classes.html#pickling-support

For meta data in ImageSpec, using to_xml() from_xml() could be an alternative although it does seem that from_xml() is not fully implemented to capture all meta data. There may be other alternatives which I am not aware of.

Thanks for consideration.

Contributor guide

Open the contributing guide

Research direction

Start with the Python bindings for ImageBuf and ImageSpec and the pybind11 pickling-support guidance linked in the issue. Compare the proposed to_xml()/from_xml() metadata route, noting that from_xml() may not preserve all metadata. Done means both objects can be pickled for multiprocessing with the required ImageSpec metadata retained.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, computer-graphics
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.