首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏一“技”之长

    iOS开发CoreGraphics核心图形框架之七——图像处理

    CGImageRef rectImage = CGImageCreateWithImageInRect(orignImage, CGRectMake(300, 400, 800, 400)); CGContextDrawImage 需要注意,CGContextDrawImage()方法渲染的图像是上下翻转的,可以通过调整坐标系来将图片翻转回来。 103, 214}; CGImageRef mask2 = CGImageCreateWithMaskingColors(orignImage, myMaskingColors); CGContextDrawImage 103, 214}; CGImageRef mask2 = CGImageCreateWithMaskingColors(orignImage, myMaskingColors); CGContextDrawImage nil, YES); //进行膜层的裁剪 CGContextClipToMask(contextRef, CGRectMake(0, 0, 320, 200), mask); CGContextDrawImage

    1.9K10发布于 2018-08-15
  • 来自专栏css小迷妹

    iOS实现毛玻璃效果,图片模糊效果的三种方法

    effectInContext, 1.0, -1.0); CGContextTranslateCTM(effectInContext, 0, -self.size.height); CGContextDrawImage outputContext, 1.0, -1.0); CGContextTranslateCTM(outputContext, 0, -self.size.height); // 开始画底图 CGContextDrawImage ) { CGContextClipToMask(outputContext, imageRect, maskImage.CGImage); } CGContextDrawImage

    3.2K10发布于 2021-10-29
  • 来自专栏小黑娃Henry

    iOS-使用coreGraphics进行图片解压缩iOS-使用coreGraphics进行图片解压缩

    将CGImage在CGContextRef上绘制出来 /* CGContextDrawImage 使用的是Core Graphics框架,坐标系与UIKit 不一样。 CGContextDrawImage 参数1:绘图上下文 参数2:rect坐标 参数3:绘制的图片 */ CGContextDrawImage(contentRef

    78320发布于 2021-08-09
  • 来自专栏大师级码师

    ios通过按钮点击异步加载图片代码

    context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst); CGContextDrawImage (context, CGRectMake(0, 0, w, h), img.CGImage); CGContextDrawImage(context, CGRectMake(w - logoWidth

    2.1K10发布于 2021-10-29
  • 来自专栏进击的多媒体开发

    GLSL加载纹理颠倒的六种解决方案

    CGImageGetColorSpace(spriteImage), kCGImageAlphaPremultipliedLast); //5、在CGContextRef上--> 将图片绘制出来 /* CGContextDrawImage CGContextDrawImage 参数1:绘图上下文 参数2:rect坐标 参数3:绘制的图片 */ CGRect rect = CGRectMake rect.size.height CGContextScaleCTM(spriteContext, 1.0, -1.0); //x,缩放1.0,y,缩放-1.0 //6.使用默认方式绘制 CGContextDrawImage

    1.8K10发布于 2020-03-09
  • 来自专栏代码小技巧分享分析

    iOS使用代码截图

    UIGraphicsBeginImageContext(size); CGContextRef context = UIGraphicsGetCurrentContext(); CGContextDrawImage

    1.2K00发布于 2021-10-31
  • 来自专栏好派笔记

    Objective-C 程序实现在图片上添加文字

    context = CGBitmapContextCreate(NULL, w, h, 8, 4 * w, colorSpace, kCGImageAlphaPremultipliedFirst); CGContextDrawImage

    1.4K40发布于 2021-10-29
  • 来自专栏云原生布道专栏

    【IOS开发基础系列】SDWebImageDownloader专题

    UIGraphicsBeginImageContextWithOptions(imageSize, YES, 0); //        CGContextRef context = UIGraphicsGetCurrentContext(); //        CGContextDrawImage UIScreenmainScreen].scale); //    // draw alpha-mask     CGContextSetBlendMode(context,kCGBlendModeNormal); //    CGContextDrawImage CGImageGetBitsPerComponent(imageRef),CGImageGetBytesPerRow(imageRef),colorSpaceInfo, bitmapInfo); //    CGContextDrawImage context)          return image;     CGContextDrawImage(context,imageRect, imageRef);     CGImageRef decompressedImageRef

    1.4K20编辑于 2023-10-16
  • 来自专栏王大锤

    iOS拍照图片旋转的问题

    CGContextDrawImage(ctx, CGRectMake(0,0,self.size.height,self.size.width), self.CGImage); break; default: CGContextDrawImage(ctx, CGRectMake(0,0,self.size.width,self.size.height

    6.8K40发布于 2019-03-20
  • 来自专栏云原生布道专栏

    【IOS开发进阶系列】APP性能优化专题

    imageSize, YES, 0);     //        CGContextRef context = UIGraphicsGetCurrentContext();     //        CGContextDrawImage mainScreen].scale, imageSize.height * [UIScreen mainScreen].scale);     //    // draw alpha-mask     //    CGContextDrawImage CGImageGetBitsPerComponent(imageRef),CGImageGetBytesPerRow(imageRef), colorSpaceInfo, bitmapInfo);     //    CGContextDrawImage targetWidth, targetHeight,CGImageGetBitsPerComponent(imageRef),0, colorSpaceInfo, bitmapInfo);     //    CGContextDrawImage

    1.2K20编辑于 2023-10-16
  • 来自专栏岑志军的专栏

    iOS系统生成二维码

    CGContextSetInterpolationQuality(bitmapRef, kCGInterpolationNone); CGContextScaleCTM(bitmapRef, scale, scale); CGContextDrawImage

    83840发布于 2018-05-28
  • 来自专栏一棹烟波

    OpenCV Mat与UIImage之间的转换

    kCGBitmapByteOrderDefault); // Bitmap info flags 17 18 CGContextDrawImage

    1.6K30发布于 2019-05-25
  • 来自专栏Rindew的iOS技术分享

    iOS 刮奖

    kCGImageAlphaOnly); CGRect rect = CGRectMake(0, 0, width, height); CGContextClearRect(context, rect); CGContextDrawImage

    65610发布于 2019-12-24
  • 来自专栏岑志军的专栏

    iOS模仿系统相机拍照你不曾注意过的细节

    CGContextDrawImage(ctx, CGRectMake(0,0,self.size.height,self.size.width), self.CGImage); break; default: CGContextDrawImage(ctx, CGRectMake(0,0,self.size.width,self.size.height

    83520发布于 2018-07-03
  • 来自专栏直播知识

    短视频直播源码,iOS图片去背景

                                                     colorSpace,                                                  kCGImageAlphaPremultipliedLast);     CGContextDrawImage

    83830发布于 2020-11-20
  • 来自专栏小黑娃Henry

    OpenGLES(五)- ESLS案例:纹理贴图OpenGLES(五)- ESLS案例:纹理贴图

    将CGImage在CGContextRef上绘制出来 /* CGContextDrawImage 使用的是Core Graphics框架,坐标系与UIKit 不一样。 CGContextDrawImage 参数1:绘图上下文 参数2:rect坐标 参数3:绘制的图片 */ CGContextDrawImage(contentRef

    1.4K20发布于 2021-08-09
  • 来自专栏24K纯开源

    Mac OS X平台下QuickLook开发教程

    CGSize){.width = OUT_WIDTH, .height = OUT_HEIGHT+LOGO_HEIGHT}, YES, properties); CGContextDrawImage CGSize){.width = OUT_WIDTH, .height = OUT_HEIGHT+LOGO_HEIGHT}, YES, properties); CGContextDrawImage

    1.6K80发布于 2018-01-18
  • 来自专栏老司机的简书

    CoreText实现图文混排之文字环绕及点击算法

    UIImage * image = [UIImage imageNamed:@"1.jpg"]; [self handleActiveRectWithFrame:_frame]; CGContextDrawImage (context,_imgFrm, image.CGImage); CGContextDrawImage(context, cirP.bounds, [[UIImage imageNamed image dw_ClipImageWithPath:cirP mode:(DWContentModeScaleAspectFill)] 有了图片了,情况基本就变成了我们熟悉的状况了,绘制图片 CGContextDrawImage

    1.7K20发布于 2018-08-22
  • 来自专栏iOS面试技术问题

    探讨iOS 图片解压缩到渲染过程

    context) return NULL; CGContextDrawImage(context, CGRectMake(0, 0, width, height), imageRef) 它接受一个原始的位图参数 imageRef ,最终返回一个新的解压缩后的位图 newImage ,中间主要经过了以下三个步骤: 使用 CGBitmapContextCreate 函数创建一个位图上下文; 使用 CGContextDrawImage

    2.1K40发布于 2020-09-17
  • 来自专栏码客

    iOS 自定义UIImagePickerController

    UIImageOrientationLeftMirrored: case UIImageOrientationRight: case UIImageOrientationRightMirrored: CGContextDrawImage aImage.size.height,aImage.size.width), aImage.CGImage); break; default: CGContextDrawImage

    1.9K10发布于 2019-10-22
领券