我基於下面的代碼此錯誤消息:斯威夫特 - 'UInt32的' 是無法轉換爲 'CGImage'
錯誤消息
/Users/MNurdin/Documents/iOS/XXXXX/HAHA.swift:534:38: 'UInt32' is not convertible to 'CGImage'
我的代碼
let context : CGContextRef = CGBitmapContextCreate(nil, CGImageGetWidth(image.CGImage), CGImageGetHeight(image.CGImage),
CGImageGetBitsPerComponent(image.CGImage),
CGImageGetBytesPerRow(image.CGImage),
CGImageGetColorSpace(image.CGImage),
CGImageGetBitmapInfo(UInt32(image.CGImage)).rawValue)!;
CGContextConcatCTM(context, transform);
請指點。謝謝。
我得到了 'UInt32的'不能轉換爲'CGBitmapInfo'。 –