Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GPUImage presents vertical black bars when using iPhone front camera

I am trying to integrate GPUImage into my iPhone app to take photos with real-time filters. But I found an annoying problem: when I use the front camera to take photos, there are always some vertical black bars in the result image.

  • Rear camera never has this problem;
  • It has nothing to do with filters, I have tried without any filter.

First I think it has something to do with my iPhone hardware, then I searched on internet, other developers have met the same problem (with no solution).

see image here: https://i.sstatic.net/rPAJ9.jpg

like image 956
NeoWang Avatar asked Jul 14 '26 03:07

NeoWang


1 Answers

Maybe this can help you out:

I had the same exact problem. In the GPUImageStillCamera.m, I commented out "[self captureOutput:photoOutput didOutputSampleBuffer:imageSampleBuffer fromConnection:[[photoOutput connections] objectAtIndex:0]];" and now the glitches are gone. That's the only way I was able to fix the problem without forcing GPUImageOpenGLESContext's +supportsFastTextureUpload to return NO.

for more see: here

like image 187
zero3nna Avatar answered Jul 18 '26 11:07

zero3nna



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!