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

Crash: glCheckFramebufferStatus returns 36054 #270

Open AlexeyIS opened 5 years ago

AlexeyIS commented 5 years ago

Hi everybody, I am keep having the crash when resampling image. I debugged down the line that gives error: Base/OpenGLRendering.swift :207 glCheckFramebufferStatus returns 36054 status and cause the fatal error Fatal error: Could not create a framebuffer of the size (5120, 2560), error: FramebufferCreationError(errorCode: 36054): file /Users/alexeyledovskiy/Documents/Projects/HolobuilderProjects/jwaiOS/jobwalkapp/jobwalkapp/Frameworks/GPUImage2/framework/Source/FramebufferCache.swift, line 39

Does anybody has any Ideas?

I am doing this in high level: let resample = LanczosResampling.init() resample.overriddenOutputSize = size let res = self.filterWithOperation(resample)

Size is ▿ Size

BradLarson commented 5 years ago

5120 pixels is beyond the maximum texture size of many iOS devices. This is most likely failing because it is unable to create a texture of that size, thus the error you are seeing.

Unfortunately, there is no great way at present to handle images beyond 4096 x 4096 in this framework, so you may need to cap the image size at that.