dtdh.net
当前位置:首页 >> uiimAgE sCAlE >>

uiimAgE sCAlE

UIImage类没有提供修改frame的方法,我们需要扩展UIImage类自己实现 @interface UIImage (Scale) -(UIImage *)TransformtoSize:(CGSize)Newsize; @end //UIImage.m #import "UIImage.h" @implementation UIImage (Scale) - (UIImage *)scaleToSi...

- (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize { UIGraphicsBeginImageContext(CGSizeMake(image.size.width * scaleSize, image.size.height * scaleSize); [image drawInRect:CGRectMake(0, 0, image.size.width * scal...

- (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize { UIGraphicsBeginImageContext(CGSizeMake(image.size.width * scaleSize, image.size.height * scaleSize); [image drawInRect:CGRectMake(0, 0, image.size.width * scal...

肯定是会改变的!

‍ // 在某个区域截图 - (UIImage*)grabImageWithRect:(CGRect)rect { CGFloat scale = self.scale; CGRect rectTemp = CGRectMake(rect.origin.x*scale, rect.origin.y *scale, rect.size.width *scale, rect.size.height*scale); CGImage...

1.等比率缩放 - (UIImage *)scaleImage:(UIImage *)image toScale:(float)scaleSize { UIGraphicsBeginImageContext(CGSizeMake(image.size.width * scale...

网站首页 | 网站地图
All rights reserved Powered by www.dtdh.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com