GPUImage3
GPUImage3 copied to clipboard
processImage(synchronously: false) doesn't callback with image
Using the sample code from GPUImage2 for processImage()
works if you provide synchronously: true
but if its synchronously: false
it will never call the callback:
let toonFilter = SmoothToonFilter()
let testImage = UIImage(named:"WID-small.jpg")!
let pictureInput = PictureInput(image:testImage)
let pictureOutput = PictureOutput()
pictureOutput.imageAvailableCallback = {image in
// Do something with image
}
pictureInput --> toonFilter --> pictureOutput
pictureInput.processImage(synchronously: false) // <--- If set to `true` imageAvailableCallback is never called