- (UIImage *)getCroppedImage {
CGRect imageRect = CGRectMake(10,10,100,100);
UIImage *ima=[UIImage imageNamed:@"2.jpg"];
CGImageRef imageRef = CGImageCreateWithImageInRect([ima CGImage], imageRect);
UIImage *result = [UIImage imageWithCGImage:imageRef
scale:1.0
orientation:ima.imageOrientation];
CGImageRelease(imageRef);
return result;
}