Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MTICoreImageUnaryFilter() is Not working as expected (version 1.25.2) | converting MTIImage to UiImage always returns nil #384

Open
sagarthecoder opened this issue Apr 16, 2024 · 0 comments

Comments

@sagarthecoder
Copy link

The current Version 1.25.2 has a huge bug. When I use the output MTIImage from MTICoreImageUnaryFilter , I can't convert it to CIImage or UIImage. It provides nil. and when using MTICoreImageUnaryFilter, a warning is found in console which is "[CIContext(CIRenderDestination) _startTaskToRender:toDestination:forPrepareRender:forClear:error:] The image extent and destination extent do not intersect."

Then I back to the old version "1.24.2" and everything is ok in this version.

This is my code

func getCIFilteredMTIImage(ciFilter : CIFilter?, inputImage : MTIImage?)-> MTIImage? {
        return autoreleasepool {
            guard let ciFilter = ciFilter, let inputImage = inputImage else {
                return nil
            }
            
            let coreFilter = MTICoreImageUnaryFilter()
            coreFilter.inputImage = inputImage
            coreFilter.filter = ciFilter
            return coreFilter.outputImage
        }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant