data-capture

Constructing QImage from unsigned char* data

落爺英雄遲暮 提交于 2019-12-07 07:27:11
问题 I encountered a problem with passing Image object (captured with Point Grej FlyCapture2 SDK) to QImage object. I am getting a pointer associated with Image data by function: virtual unsigned char* FlyCapture2::GetData ( ) and then loading the data by: QImage::QImage ( uchar * data, int width, int height, int bytesPerLine, Format format ) Formats of data of both Image objects are 8-bit monocolor. BytesPerLine parameter should be equal to width of the Image (I've already checked it by saving

Constructing QImage from unsigned char* data

倾然丶 夕夏残阳落幕 提交于 2019-12-05 13:23:01
I encountered a problem with passing Image object (captured with Point Grej FlyCapture2 SDK) to QImage object. I am getting a pointer associated with Image data by function: virtual unsigned char* FlyCapture2::GetData ( ) and then loading the data by: QImage::QImage ( uchar * data, int width, int height, int bytesPerLine, Format format ) Formats of data of both Image objects are 8-bit monocolor. BytesPerLine parameter should be equal to width of the Image (I've already checked it by saving FlyCapture2::Image to .bmp and then loading it to QImage). Do you thing the problem is casting from