Inconsistent RBG/BGR format in video frames from Android cameras



  • Hi,
    I use a video filter on a camera in QML, this gets me QVideoFrames that I convert to QImages for processing.
    I load them into RGBA8888 QImages, but it needs to be BGR so if the input frames are BGR32 (android devices do this) that's already good, if they are RGB32 (iphones do this) I use rgbSwapped on the QImage.
    The problem is on all android devices the video frames report as BGR32, but some contain BGRX data while others contain RGBX data and I need to use rgbSwapped on them.
    How can I detect which it is when the only information I have to go on is the same for both?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.