title: why the images orientation is changing when loading the image from the cache?
body: <p>I have an application in which i am loading the images from the image caches.`</p>
  
  <pre><code>if(![[ImageCache sharedImageCache] hasImageWithKey:imagepath])
  
                  {   cell.bannerview2.image = [UIImage imageNamed:@"no_imags.png"];
                      NSArray *myArray = [NSArray arrayWithObjects:cell.bannerview2,imagepath,@"no_imags.png",[NSNumber numberWithBool:NO],nil];
                      AppDelegate *appDelegate = (AppDelegate  *)[[UIApplication sharedApplication] delegate];
                      [appDelegate performSelectorInBackground:@selector(updateImageViewInBackground:) withObject:myArray];   
  
                  }
                  else 
                  {
                      cell.bannerview2.image = [[ImageCache sharedImageCache] getImagefromCacheOrUrl:imagepath];
                   }
              }
              else
              {
                  cell.bannerview2.image = [UIImage imageNamed:@"no_imags.png"];  
  
              } 
  </code></pre>
  
  <p>this is how i am doing the image cache process.But the problem is when the image is larger than the required frame the image orientation is changing.this is my image updating code in the appdelegate</p>
  
  <pre><code>-(void)updateImageViewInBackground:(NSArray *)idsArray{
      //NSLog(@"IN METHOD idsArray %@",idsArray);
      NSString *iconurl = (NSString *)[idsArray objectAtIndex:1];
  
      NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
      if([[ImageCache sharedImageCache] hasImageWithKey:iconurl]){
          [self performSelectorOnMainThread:@selector(updateImageViewInForeground:) withObject:idsArray waitUntilDone:NO];
          [pool release];
          return;
      }
      if([iconurl length] &gt; 0){
          [[ImageCache sharedImageCache] saveImageToCacheOfUrl:iconurl];
      }
      [self performSelectorOnMainThread:@selector(updateImageViewInForeground:) withObject:idsArray waitUntilDone:NO];
      [pool release];
  }
  -(void)updateImageViewInForeground:(NSArray *)idsArray{
  
      UIImageView *weatherView = (UIImageView *)[idsArray objectAtIndex:0];
      NSString *iconurl = (NSString *)[idsArray objectAtIndex:1];
      NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
      weatherView.image = [[ImageCache sharedImageCache] getImagefromCacheOrUrl:iconurl];
      if(weatherView.image == nil){
          NSString *defaultname = (NSString *)[idsArray objectAtIndex:2];
          weatherView.image = [UIImage imageNamed: defaultname];
      }
      BOOL resizeImgView = [(NSNumber *)[idsArray objectAtIndex:3] boolValue];
      if(resizeImgView){
          //NSLog(@"resizeImgView %@ %@",iconurl,weatherView);
          weatherView.frame = CGRectMake(weatherView.frame.origin.x, weatherView.frame.origin.y, weatherView.image.size.width, weatherView.image.size.height);
  
  
  
  
  
      }
      [pool release];
  }
  </code></pre>
  
  <p>can anybody help me?</p>