Image Conversion: RGBA to RGB

Assuming RGBA (32 bits) is output from the frame grabber and the alpha channel is not used (values ​​are saved when filled with frame grabbers), is there any efficient conversion method to RGB (24 bits)?

I deal with 5 MegaPixels streaming images, so speed matters too. keep in mind that data in the alpha channel may be discarded.

+3
source share
2 answers

Just copy the data and skip unused alpha bytes.

If speed is important to you, you can use SSE or MMX and use the built-in bit shuffling instructions. This is usually slightly faster than regular c code.

5 , , 100 .

+2

RGB - (1 ). . , Intel IPP-.

+3

Source: https://habr.com/ru/post/1735182/


All Articles