title: UIImage Does Not Load Image
body: <p>I am using UIImage to plot a png. I have getting a weird behavior that I cannot understand.</p>
  
  <p>The following piece of code results in a nil im reference and thus prints "PROBLEM!"</p>
  
  <pre><code>UIImage *im = [[UIImage alloc] initWithContentsOfFile:@"tree.png"]; 
  
  if (nil==im)
      NSLog(@"PROBLEM! IMAGE NOT LOADED\n");
  else
      NSLog(@"OK - IMAGE LOADED\n");
  </code></pre>
  
  <p>This piece of code works finely:</p>
  
  <pre><code>UIImage *im = [UIImage alloc]; 
  
  [im initWithContentsOfFile:@"tree.png"];
  
  if (nil==im)
      NSLog(@"PROBLEM! IMAGE NOT LOADED\n");
  else
      NSLog(@"OK - IMAGE LOADED\n");
  </code></pre>
  
  <p>What am I missing?</p>