title: Getting Error Trying to Create AspectRatioThumbnail from Image I/O
body: <p>I'm trying to create an aspect ratio thumbnail from an <code>ALAsset</code> for pre iOS5 (the <code>ALAssetDefaultRepresentation aspectRatioThumbnail</code> wasn't implemented until ios5). I have the following code and it's giving me an error for some reason:</p>
  
  <pre><code>CGImageRef imref;
      NSURL* url = [self.photoAsset.defaultRepresentation url];
      NSDictionary *dictionary = [NSDictionary dictionaryWithObjectsAndKeys:
                         (id)kCFBooleanTrue, kCGImageSourceShouldAllowFloat,
                         (id)kCFBooleanTrue, kCGImageSourceCreateThumbnailWithTransform,
                         (id)kCFBooleanTrue, kCGImageSourceCreateThumbnailFromImageAlways,
                         [NSNumber numberWithInteger:1024], kCGImageSourceThumbnailMaxPixelSize, nil];
      CGImageSourceRef src = CGImageSourceCreateWithURL((CFURLRef)url, NULL);
      imref = CGImageSourceCreateThumbnailAtIndex(src, 0, (CFDictionaryRef) dictionary);
  </code></pre>
  
  <p>Specifically I'm getting: </p>
  
  <pre><code>ImageIO: &lt;ERROR&gt;  CGImageSourceCreateWithURL CFURLCreateDataAndPropertiesFromResource failed with error code -11.ImageIO: &lt;ERROR&gt;  CGImageSourceCreateThumbnailAtIndex image source parameter is nil
  </code></pre>
  
  <p>Anyone know what's going on?</p>