My code was lived well recently. But today after I update my Xcode 13.1.( It ask me to install some components and I always click yes.)
Then all code related to core graphic like this can't work now. Not only the code but also the constant like: kCGImagePropertyExifFlash is failed to be recognized too.
Does anybody know what happened?
// Write Image
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
CGContextRef bitmapContext = CGBitmapContextCreate(
pBuffer,
imgInfo.nWidth,
imgInfo.nHeight,
8, // bitsPerComponent
4*imgInfo.nWidth, // bytesPerRow
colorSpace,
kCGImageAlphaNoneSkipLast);