Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- vImage_Buffer src;
- src.height = height;
- src.width = width;
- src.rowBytes = srcBytesPerRow;
- src.data = srcRows;
- vImage_Buffer dest;
- dest.height = height;
- dest.width = width;
- dest.rowBytes = destBytesPerRow;
- dest.data = destRows;
- // Swap pixel channels from BGRA to RGBA.
- const uint8_t map[4] = { 2, 1, 0, 3 };
- vImagePermuteChannels_ARGB8888(&src, &dest, map, kvImageNoFlags);
Add Comment
Please, Sign In to add comment