title: Applying a CIFilter to an image produces empty UIImage
body: <p>I’m trying to apply a CIFilter to an image that I receive from <code>UIImagePickerController</code>. Here is the code I’m using:</p>
  
  <pre><code>- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info {
  
      [picker dismissViewControllerAnimated:YES completion:nil];
  
      UIImage *userImage = info[UIImagePickerControllerOriginalImage];
      UIImage *croppedImage = [UIImage imageWithCGImage:CGImageCreateWithImageInRect(userImage.CGImage, CGRectMake(0, 320, 640, 640))];
  
      CIContext *context = [CIContext contextWithOptions:nil];
      CIImage *img = [CIImage imageWithCGImage:croppedImage.CGImage];
      CIFilter *adjustFilter = [CIFilter filterWithName:@"CILineOverlay"];
  
      [adjustFilter setDefaults];
      [adjustFilter setValue:img forKey:kCIInputImageKey];
      [adjustFilter setValue:[NSNumber numberWithFloat:1.0] forKey:@"inputNRSharpness"];
      CIImage *adjustedImage = [adjustFilter valueForKey:kCIOutputImageKey];
      UIImage *newImage = [UIImage imageWithCIImage:[context createCGImage:adjustedImage fromRect:adjustedImage.extent]];
  
      NSLog(@"%@", newImage);
  
      self.myImageView.image = newImage;
  
  }
  </code></pre>
  
  <p>Now, when the process of applying the filter is done (there are no errors popping up), no image is visible in the image view (though the console does log <code>&lt;UIImage: 0x8b91810&gt;</code>). If I skip the processing part and just assign the unfiltered <code>croppedImage</code> to the image view, it is displayed fine.</p>
  
  <p>So what am I doing wrong here? I’m wanting to use this code to process a screenshot, but I’ve tried it with a photo and got the same (zero) result.</p>