I'm trying to make a wrapper to use a C++ Class in Python but I can't find a way to pass this image I already loaded in my Python program.
I could pass the path to the image and load it inside the C++ function again but that's not the solution I want.
"that's not the solution I want."
Why not?
Anyway, the C++ will not understand the Image object. It is more likely that it does want just the raw image data. You can get that by calling the tostring() method on the image object, passing in a encoder and parameters.
But reading the file directly will be much faster.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.