You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Error Domain=MTLLibraryErrorDomain Code=5 "Function mtiSurfaceBlur was not found in the library" UserInfo={NSLocalizedDescription=Function mtiSurfaceBlur was not found in the library}
My code is:
`
guard let cgImage = image.cgImage else { return }
let filter = MTISurfaceBlurFilter(radius: radius)
filter.threshold = threshold
filter.inputImage = MTIImage(__cgImage: cgImage, options: nil, isOpaque: true)
let options = MTIContextOptions()
guard let device = MTLCreateSystemDefaultDevice(), let context = try? MTIContext(device: device, options: options), let outputImage = filter.outputImage else {
return
}
do {
let filteredImage = try context.makeCGImage(from: outputImage)
filteredImg = UIImage(cgImage: filteredImage)
importImage.image = filteredImg
} catch {
print(error)
}`
Any help is appreciated! Thanks!
The text was updated successfully, but these errors were encountered:
When I execute, I get an error:
My code is:
`
guard let cgImage = image.cgImage else { return }
Any help is appreciated! Thanks!
The text was updated successfully, but these errors were encountered: