0
나는 다음과 같이 CGImage
에서 vImage_CGImageFormat
를 생성 스위프트에서 함수를 쓰고 있어요 :CGColorSpace에서 관리되지 않는 <CGColorSpace>를 어떻게 얻습니까?
vImage_CGImageFormat(
bitsPerComponent: UInt32(CGImageGetBitsPerComponent(image)),
bitsPerPixel: UInt32(CGImageGetBitsPerPixel(image)),
colorSpace: CGImageGetColorSpace(image),
bitmapInfo: CGImageGetBitmapInfo(image),
version: UInt32(0),
decode: CGImageGetDecode(image),
renderingIntent: CGImageGetRenderingIntent(image))
이 그러나 컴파일되지 않습니다. CGImageGetColorSpace(image)
이 CGColorSpace!
을 반환하고 위의 생성자가 colorSpace
매개 변수에만 Unmanaged<CGColorSpace>
을 가져 가기 때문입니다.
다른 방법이 있습니까? 아마도 CGColorSpace
을 Unmanaged<CGColorSpace>
으로 변환 하시겠습니까?
당신의 선생님을하는 gentleme 있습니다 n 학자 – fyell