title: Interpret XMP-Metadata in ALAssetRepresentation
body: <p>When a user makes some changes (cropping, red-eye removal, ...) to photos in the built-in <strong>Photos.app</strong> on iOS, the changes are not applied to the <code>fullResolutionImage</code> returned by the corresponding <code>ALAssetRepresentation</code>. </p>
  
  <p>However, the changes are applied to the <code>thumbnail</code> and the <code>fullScreenImage</code> returned by the <code>ALAssetRepresentation</code>.
  Furthermore, information about the applied changes can be found in the <code>ALAssetRepresentation</code>'s   metadata dictionary via the key <code>@"AdjustmentXMP"</code>.</p>
  
  <p>I would like to apply these changes to the <code>fullResolutionImage</code> myself to preserve consistency. I've found out that on <strong>iOS6+</strong> <code>CIFilter</code>'s <code>filterArrayFromSerializedXMP:                              inputImageExtent:error:</code> can convert this XMP-metadata to an array of <code>CIFilter</code>'s:</p>
  
  <pre><code>ALAssetRepresentation *rep; 
  NSString *xmpString = rep.metadata[@"AdjustmentXMP"];
  NSData *xmpData = [xmpString dataUsingEncoding:NSUTF8StringEncoding];
  
  CIImage *image = [CIImage imageWithCGImage:rep.fullResolutionImage];
  
  NSError *error = nil;
  NSArray *filterArray = [CIFilter filterArrayFromSerializedXMP:xmpData 
                                               inputImageExtent:image.extent 
                                                          error:&amp;error];
  if (error) {
       NSLog(@"Error during CIFilter creation: %@", [error localizedDescription]);
  }
  
  CIContext *context = [CIContext contextWithOptions:nil];
  
  for (CIFilter *filter in filterArray) {
       [filter setValue:image forKey:kCIInputImageKey];
       image = [filter outputImage];
  }
  </code></pre>
  
  <p>However, this works only for some filters (cropping, auto-enhance) but not for others like red-eye removal. In these cases, the <code>CIFilter</code>s have no visible effect. Therefore, my questions:</p>
  
  <ul>
  <li>Is anyone aware of a way to create red-eye removal <code>CIFilter</code>? (In a way consistent with the Photos.app. The filter with the key <code>kCIImageAutoAdjustRedEye</code> is not enough. E.g., it does not take parameters for the position of the eyes.)</li>
  <li>Is there a possibility to generate and apply these filters under iOS 5? </li>
  </ul>