+(UIImage *)scaleImage: (UIImage *)image scaleFactor:(float)scaleFloat

{

CGSize size = CGSizeMake(image.size.width * scaleFloat, image.size.height * scaleFloat);

UIGraphicsBeginImageContext(size);

CGContextRef context = UIGraphicsGetCurrentContext();

CGAffineTransform transform = CGAffineTransformIdentity;

transform = CGAffineTransformScale(transform, scaleFloat, scaleFloat);

CGContextConcatCTM(context, transform);

// Draw the image into the transformed context and return the image

[image drawAtPoint:CGPointMake(0.0f, 0.0f)];

UIImage *newimg = UIGraphicsGetImageFromCurrentImageContext();

UIGraphicsEndImageContext();

return newimg;

}

05-07 15:24