? ? CGContextRef ctx = CGBitmapContextCreate(
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? outBuffer.data,
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? outBuffer.width,
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? outBuffer.height,
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? bitsPerComponent,
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? outBuffer.rowBytes,
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? colorSpace,
?? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? kCGImageAlphaNoneSkipLast);
可以試試把?outBuffer.rowBytes改為?outBuffer.width * 4或者把 colorSpace改為?CGImageGetColorSpace(img)蔑滓。