When I am converting RGBA to ARGB, I used this code:
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);
I am getting the error below: For that I added Convertion.h
and Accelerate.framework
.
Undefined symbols for architecture armv6:
"_vImagePermuteChannels_ARGB8888", referenced from: -[CCOverlayView processImage] in CCOverlayView.o ld: symbol(s) not found for architecture armv6 collect2: ld returned 1 exit status
Can any one help me please?
You may be seeing one of two problems:
1) This routine is located in the Accelerate.framework
. You need to add this to your project.
2) This routine is only available in iOS 5.0 and later; you probably should not be including armv6 in these builds. (The devices that require armv6 cannot run iOS 5.0).