画图片
来源:互联网 发布:db2链接数据库 编辑:程序博客网 时间:2024/03/28 20:56
`- (void)rotateTapped:(id)sender {
UIImage *currentImage = _imageView.image;
CGImageRef currentCGImage = currentImage.CGImage;
CGSize originalSize = currentImage.size;CGSize rotatedSize = CGSizeMake(originalSize.height, originalSize.width);CGContextRef context = CGBitmapContextCreate(NULL, rotatedSize.width, rotatedSize.height, CGImageGetBitsPerComponent(currentCGImage), CGImageGetBitsPerPixel(currentCGImage) * rotatedSize.width, CGImageGetColorSpace(currentCGImage), CGImageGetBitmapInfo(currentCGImage));CGContextTranslateCTM(context, rotatedSize.width, 0.0f);CGContextRotateCTM(context, M_PI_2);CGContextDrawImage(context, (CGRect){.origin=CGPointZero, .size=originalSize}, currentCGImage);CGImageRef newCGImage = CGBitmapContextCreateImage(context);UIImage *newImage = [UIImage imageWithCGImage:newCGImage];self.imageView.image = newImage;
}
`
0 0
- 画图片
- PageControl上画图片
- canvas 画图片
- GdiplusFlat(5)画图片
- canvas 画图片没有显示
- 自定义控件使用GDI+画图片
- android 在画布上画图片
- HTML5中Canvas画图片的问题
- java画图片和图片路径问题
- 在Java se中画图片
- Qt中如何保存 自画图片 为 图片文件
- Qt中如何保存 自画图片 为 图片文件
- 35.在layer上画文字 画图片
- java中如何画图片与水印,验证码
- 利用CGContext简单的实现画圆画图片
- iOS 获取十六进制颜色显示RGB,根据颜色画图片
- 谷歌浏览器canvas画图片不显示问题解决
- IOS 自定义控件之写文字和画图片
- JAVA中int、String的类型转换
- windows内网路由器设置
- RxJava 过滤操作符 distinct和elementAt
- 带着问题学习Android中View的layout布局和draw绘制
- 针对架构设计的几个痛点,我总结出的架构原则和模式
- 画图片
- Html5文件操作(1)
- CH03
- C++ 关键字 explicit, export, mutable
- UVA 1583(p52)----Digit Generator
- 云告警平台 OneAlert :如何帮助运维工程师做好汇报?
- 静态分配的顺序表
- POJ 1017 Packets
- 容易被遗忘的CSS3新属性