Jiloc / edsdk-python

Canon EDSDK wrapper for Python
MIT License
37 stars 16 forks source link

live_view error #5

Closed gwlee5482 closed 4 months ago

gwlee5482 commented 4 months ago

Using the example of "seve_image.py", we tried to implement live_view by adding the code at the bottom while leaving the camera call and the session open, but the stream invalid EdsObject 0x000001D3DD765DE0 error occurs in the edsdk.CreateEvfImageRef(stream).

print(edsdk.GetPropertyData(cam, PropID.Evf_OutputDevice,0)) edsdk.SetPropertyData(cam, PropID.Evf_OutputDevice, 0, EvfOutputDevice.PC | EvfOutputDevice.TFT) stream = edsdk.CreateMemoryStream(0), evfimage = edsdk.CreateEvfImageRef(stream) edsdk.DownloadEvfImage(cam, evfimage)

I think the memory is allocated to the stream and I put the image in the memory allocated from CreateEvfImageRef(), did anyone implement live?

gwlee5482 commented 4 months ago

Do you know how to import images in memory from Python?