Python wrapper for MSCMS color management functions - #591
Conversation
Fix for unfortunate file naming error.
WCSManager: improve exception handling from worker process: all builtins now supported WCSManager: retries on shutdown also, cause it might be a reboot WCSManager: various bug fixes and corner case handling
…oader.py) Add better handling of WcsDisassociateColorProfileFromDevice API quirks in WCS class Update documentation
|
@Anulap can you fix your code so the tests are passing please |
|
@eoyilmaz well, there is a reason this is a draft. But yes, I'll get to it eventually. Maybe this weekend or the next one. It just requires a better separation between platforms and some tests of it's own. |
aah sorry I didn't see that 👍 |
|
I have been rather busy with my new day job. But I'll continue work on this one. Windows tests are still broken. After that I might add a couple of test of my own and that will probably be it (minus bug fixes). Update: |
e092ab4 to
e016402
Compare
|
I somewhat doubt that I managed to break argyll tests now. |
|
Download error seem to be server and resource related, so I don't think that is my fault |
Port the PR eoyilmaz#591 MSCMS manager/wrapper and tests into the eoyilmaz#552 branch while preserving current cross-platform behavior and dependency set. Fix retry semantics, WCS API signature/size handling, and English test docstrings for safer Windows profile management integration. Co-authored-by: Anulap <perpetuallybored@yandex.ru>
Description
This PR introduces a Python wrapper for selected MSCMS (Microsoft Color Management System) functions. The implementation includes:
Motivation
DisplayCAL uses rather non conventional way to interact with WCS: a hybrid solution using both registry and API calls (plus a couple of kludges to try and counteract handle leak). Unfortunately, it is a rather fragile solution and the list of color profiles retrieved from registry does not necessarily coinside with internal windows tools
Architecture
WCSManager is a Singleton with lazy initialization, which provides a threadsafe interface (MPSC) to an instance of the WCS class (which runs in a separate process). Once the process containing the WCS instance passes a certain number of open handles, it is killed and restarted in a safe and consistent manner. Any logs or exceptions created in a separate process are transparently returned to the main process
Changes
Dependencies
Known issues
WIP
References