Closed monkeycc closed 8 months ago
Please provide the version of Python you used to run the script. There might be a regression in ctypes that affected comtypes for Python versions such as Python==3.8.x, Python==3.9.x, Python<3.10.10, and Python<3.11.2.
Please let me know the source of information you referred to regarding the Photoshop COM interface.
Also, you're writing code snippets that are not in Python. What is the meaning of this?
Additionally, if an error was raised, please provide details about the error.
I found https://github.com/loonghao/photoshop-python-api/ that manipulates Photoshop using comtypes
.
Within it, there were intriguing descriptions like the following:
""" * This is a hack for Photoshop's broken COM implementation. * Photoshop does not implement 'IDispatch::GetTypeInfo', so when getting a field from the COM object, comtypes will first try to fetch it as a property, then treat it as a method if it fails. * In this case, Photoshop does not return the proper error code, since it blindly treats the property getter as a method call. * Fortunately, comtypes provides a way to explicitly flag methods. """
It seems that the problems of this nature are not due to a bug in comtypes
, nor are they caused by an unknown regression in ctypes
. Instead, it appears that the root cause lies in Photoshop's COM implementation.
I am going to close this issue as there have been no replies since it was posted.
If you would like to discuss this issue again, feel free to reopen this.
"Image->Adjustments->HDR Toning"
The HDRToning window appears
How to obtain the data inside
And press OK to save