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
Using the sample code from GPUImage2 for
processImage()
works if you providesynchronously: true
but if itssynchronously: false
it will never call the callback: