title: AssetLibrary - how to load with orientation correction?
body: <p>I've created a picture indexing service (local, Facebook, Picassa, Instagram, etc). </p>
  
  <p>In the collection view, a double-tap will pop the image out of the cell to become full-sized. For local sources, it sometimes uses the wrong orientation. . How can I force it to use the orientation of the device (landscape), even if the photo makes a better fit in potrait mode? </p>
  
  <p>Here's the method to load the indexed asset from the local assets library: </p>
  
  <pre><code>- (void)performLoadFor:(GTPImage*)image onSuccess:(void (^)(UIImage*))onSuccess onError:(void (^)(NSError*))onError
  {
      [_assetsLibrary assetForURL:[NSURL URLWithString:image.address] resultBlock:^(ALAsset* asset)
      {
          if (onSuccess)
          {
              CGImageRef imageRef = [[asset defaultRepresentation] fullResolutionImage];
              onSuccess([UIImage imageWithCGImage:imageRef]);
          }
      } failureBlock:^(NSError* error)
      {
          onError(error);
      }];
  }
  </code></pre>