0

this is my code:-

(UIImage*)imageWithImage:(UIImage*)image 
              scaledToSize:(CGSize)newSize;
{        
    UIGraphicsBeginImageContext( newSize );
    [image drawInRect:CGRectMake(0,0,newSize.width,newSize.height)];
    UIImage* newImage = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

    return newImage;
}
Jainendra
  • 24,713
  • 30
  • 122
  • 169
Shehbaz Khan
  • 1,892
  • 3
  • 24
  • 31

2 Answers2

1

Use the category files from this site to resize UIImages:

Jainendra
  • 24,713
  • 30
  • 122
  • 169
0

Look this Qus , may be helped you...

Resize UIImage with aspect ratio?

Community
  • 1
  • 1
Vikas S Singh
  • 1,748
  • 1
  • 14
  • 29