title: image alignment problem in imageView - iPhone
body: <p>I have following code in my application:</p>
  
  <pre><code>// to set tip - photo in photo frame    
  NSData *data = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:pathOfThumbNail]];
  UIImage *cellThumbImg;
  
  if([data length]&gt;0){
      cellThumbImg = [UIImage imageWithData:data];
  } else {
      cellThumbImg = [UIImage imageNamed:@"130X90.gif"];
  }
  
  UIImageView *imgView = [[UIImageView alloc]initWithImage:cellThumbImg];
  
  imgView.frame = photoFrame;
  
  [imgBg setContentMode:UIViewContentModeScaleToFill];
  [cell.contentView addSubview:imgView];
  //[cell.contentView sendSubviewToBack:imgView];
  
  [imgView release];
  [data release];
  </code></pre>
  
  <p>I want the following:</p>
  
  <ul>
  <li>Suppose an image ( which is loaded through nsdata ) is having size of 60 x 60 then content mode should be UIVIewContentModeCenter</li>
  <li>Suppose an image ( which is loaded through nsdata ) is having more size then 60 x 60 then content mode should be UIViewContentModeScaleToFill.</li>
  </ul>
  
  <p>But my question is how can I determine the size of the image loaded through <code>NSData</code>?</p>