title: iOS capture image form GPUImage
body: <p>I am trying to capture an image with an app that uses GPUImage. I have the camera set up like this</p>
  
  <pre><code>self.videoCamera = [[GPUImageVideoCamera alloc]
                      initWithSessionPreset:AVCaptureSessionPresetHigh
                      cameraPosition:AVCaptureDevicePositionBack];
  _videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
  [_videoCamera startCameraCapture];
  [_videoCamera addTarget:sample1ImageView];
  </code></pre>
  
  <p>and i use a custom filter:</p>
  
  <pre><code>radFilter = [[GPUImageCustomFilter alloc] init];
  [_videoCamera addTarget:cusFilter];
  [cusFilter addTarget:imageView];
  </code></pre>
  
  <p>I then use this code for the camera capture:</p>
  
  <pre><code>[_videoCamera pauseCameraCapture];
  [radFilter forceProcessingAtSize:CGSizeMake(600, 600)];
  [radFilter useNextFrameForImageCapture];
  UIImage* capturedImage = [radFilter imageFromCurrentFramebuffer];
  UIImageWriteToSavedPhotosAlbum(capturedImage, self, @selector(image:didFinishSavingWithError:contextInfo:), nil);
  [_videoCamera resumeCameraCapture];
  </code></pre>
  
  <p>and all i get is white pictures, with rgb 0,0,0.
  I tried saving both in an IBAction and in a rac_signalForControlEvents,i used dispatch but nothing changed. Can anyone tell me what am i doing wrong?</p>
  
  <p>Thank you,
  Alex</p>