- Posts: 3
- Joined: Tue Dec 13, 2022 2:36 pm
- Real Name: John Burkhardt
Converting BGRA buffer to BGR is very simple, instead of the Frameconverter you can do that directly as follows:
- Code: Select all
c++
void BGRAtoBGR(const unsigned char* bgra, unsigned char* bgr, int width, int height) {
int straid= width * height * 3;
memcpy(bgr, bgra, straid);
bgr+= straid;
bgra+= straid+ (width * height); // skip alpha channel
}
I think this method is fast enough.