You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Use Case
My use case can benefit from performing the conversion from mono12packed in another Python process.
Problem
I've attempted to use ImageFormatConverter.Convert, and the docstring details the parameters as follows:
"""Parameters ---------- * `pDestinationBuffer` : The pointer to the buffer of the destination image. * `destinationBufferSizeBytes` : The size of the buffer of the destination image. * `pSourceBuffer` : The pointer to the buffer of the source image. * `sourceBufferSizeBytes` : The size of the buffer of the source image. * `sourcePixelType` : The pixel type of the source image. * `sourceWidth` : The number of pixels in a row in the source image. * `sourceHeight` : The number of rows in the source image. * `sourcePaddingX` : The number of extra data bytes at the end of each row. The default value is usually 0. * `sourceOrientation` : The vertical orientation of the source image in the image buffer. The default value is usually ImageOrientation_TopDown. """
However, the method actually expects a PylonImage object, as indicated by the following error message:
However, AttachUserBuffer failed with the same error regardless of the arguments provided:
return _pylon.PylonImage_AttachUserBuffer(self, *args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Wrong number or type of arguments for overloaded function 'PylonImage_AttachUserBuffer'.
Possible C/C++ prototypes are:
Pylon::CPylonImage::AttachUserBuffer(void *,size_t,Pylon::EPixelType,uint32_t,uint32_t,size_t,Pylon::EImageOrientation,CPylonImageUserBufferEventHandler *)
Pylon::CPylonImage::AttachUserBuffer(void *,size_t,Pylon::EPixelType,uint32_t,uint32_t,size_t,Pylon::EImageOrientation)
Pylon::CPylonImage::AttachUserBuffer(void *,size_t,Pylon::EPixelType,uint32_t,uint32_t,size_t)
Question
Is it possible to use Pylon's conversion on a raw buffer instead of a grabResult? If so, how can this be achieved?
The text was updated successfully, but these errors were encountered:
Use Case
My use case can benefit from performing the conversion from mono12packed in another Python process.
Problem
I've attempted to use ImageFormatConverter.Convert, and the docstring details the parameters as follows:
However, the method actually expects a PylonImage object, as indicated by the following error message:
Attempted Solution
I tried converting my bytes to a PylonImage using:
However, AttachUserBuffer failed with the same error regardless of the arguments provided:
Question
Is it possible to use Pylon's conversion on a raw buffer instead of a grabResult? If so, how can this be achieved?
The text was updated successfully, but these errors were encountered: