I've my R, G and B arrays which are uint8_t
uint8_t * R, * G, * B, * A;
int stride_r, stride_g, stride_b, stride_a;
getRGB(img, &R, &G, &B, &A, &stride_r, &stride_g, &stride_b, &stride_a);
// All the strides are equal and the img is img_width and img_height dimension
int RBG[stride_r * img_height];
SO my question is will the following work:
for(int i=0; i<stride_r * img_height; ++i)
{
RGB[i] = R[i] << 24 + G[i] << 16 + B[i] << 8 + A[i];
}