How to quickly transform from RGB24 to BGRA on iOS?
===

which I use is `vImageConvert_RGB888toARGB8888` and `vImagePermuteChannels_ARGB8888`. First change it from RGB24 to ARGB, because OPENGL ES doesn't support ARGB, so need to change ARGB to BGRA with `vImagePermuteChannels_ARGB8888`. But when the data need to change is big the time cost is high, so someone with better methods? thanks! My codes like this:

    - (void)transformRGBToBGRA:(const UInt8 *)pict{
    rgb.data = (void *)pict;
    
    vImage_Error error = vImageConvert_RGB888toARGB8888(&rgb,NULL,0,&argb,NO,kvImageNoFlags);
    if (error != kvImageNoError) {
        NSLog(@"vImageConvert_RGB888toARGB8888 error");
    }
    
    const uint8_t permuteMap[4] = {3,2,1,0};
    
    error = vImagePermuteChannels_ARGB8888(&argb,&bgra,permuteMap,kvImageNoFlags);
    if (error != kvImageNoError) {
        NSLog(@"vImagePermuteChannels_ARGB8888 error");
    }
    
    free((void *)pict);

    }
