BradLarson / GPUImage2

GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing.
BSD 3-Clause "New" or "Revised" License
4.85k stars 605 forks source link

GPUImage2 return false when using image from screenshot iPhone X #234

Open daitq2310 opened 6 years ago

daitq2310 commented 6 years ago

I have tried to capturing screen of iPhone X and using GPUImage 2 for it.

let success = sharedImageProcessingContext.context.renderbufferStorage(Int(GL_RENDERBUFFER), from:self.layer as! CAEAGLLayer)
if !success {
    return
}

This code will be returned false and my app is crashed.

I have tried to using iPhone X's screenshot to send this image to other iOS devices and using other iOS devices' screenshot and this code still works.

I just don't understand why. Can someone explain that? Thank you.