精华内容
下载资源
问答
  • iOS编辑图片位图的代码

    千次阅读 2012-02-13 14:56:11
    // // UIImage-Extensions.m // // Created by Hardy Macia on 7/1/09. // Copyright 2009 Catamount Software. All rights reserved. // #import "UIImage-Extensions.h" ...CGFloat DegreesToRadia
    //
    //  UIImage-Extensions.m
    //
    //  Created by Hardy Macia on 7/1/09.
    //  Copyright 2009 Catamount Software. All rights reserved.
    //


    #import "UIImage-Extensions.h"


    CGFloat DegreesToRadians(CGFloat degrees) {return degrees * M_PI / 180;};
    CGFloat RadiansToDegrees(CGFloat radians) {return radians * 180/M_PI;};


    @implementation UIImage (CS_Extensions)


    -(UIImage *)imageAtRect:(CGRect)rect
    {
       
       CGImageRef imageRef = CGImageCreateWithImageInRect([self CGImage], rect);
       UIImage* subImage = [UIImage imageWithCGImage: imageRef];
       CGImageRelease(imageRef);
       
       return subImage;
       
    }


    - (UIImage *)imageByScalingProportionallyToMinimumSize:(CGSize)targetSize {
       
       UIImage *sourceImage = self;
       UIImage *newImage = nil;
       
       CGSize imageSize = sourceImage.size;
       CGFloat width = imageSize.width;
       CGFloat height = imageSize.height;
       
       CGFloat targetWidth = targetSize.width;
       CGFloat targetHeight = targetSize.height;
       
       CGFloat scaleFactor = 0.0;
       CGFloat scaledWidth = targetWidth;
       CGFloat scaledHeight = targetHeight;
       
       CGPoint thumbnailPoint = CGPointMake(0.0,0.0);
       
       if (CGSizeEqualToSize(imageSize, targetSize) == NO) {
          
          CGFloat widthFactor = targetWidth / width;
          CGFloat heightFactor = targetHeight / height;
          
          if (widthFactor > heightFactor) 
             scaleFactor = widthFactor;
          else
             scaleFactor = heightFactor;
          
          scaledWidth  = width * scaleFactor;
          scaledHeight = height * scaleFactor;
          
          // center the image
          
          if (widthFactor > heightFactor) {
             thumbnailPoint.y = (targetHeight - scaledHeight) * 0.5; 
          } else if (widthFactor < heightFactor) {
             thumbnailPoint.x = (targetWidth - scaledWidth) * 0.5;
          }
       }
       
       
       // this is actually the interesting part:
       
       UIGraphicsBeginImageContext(targetSize);
       
       CGRect thumbnailRect = CGRectZero;
       thumbnailRect.origin = thumbnailPoint;
       thumbnailRect.size.width  = scaledWidth;
       thumbnailRect.size.height = scaledHeight;
       
       [sourceImage drawInRect:thumbnailRect];
       
       newImage = UIGraphicsGetImageFromCurrentImageContext();
       UIGraphicsEndImageContext();
       
       if(newImage == nil) NSLog(@"could not scale image");
       
       
       return newImage ;
    }




    - (UIImage *)imageByScalingProportionallyToSize:(CGSize)targetSize {
       
       UIImage *sourceImage = self;
       UIImage *newImage = nil;
       
       CGSize imageSize = sourceImage.size;
       CGFloat width = imageSize.width;
       CGFloat height = imageSize.height;
       
       CGFloat targetWidth = targetSize.width;
       CGFloat targetHeight = targetSize.height;
       
       CGFloat scaleFactor = 0.0;
       CGFloat scaledWidth = targetWidth;
       CGFloat scaledHeight = targetHeight;
       
       CGPoint thumbnailPoint = CGPointMake(0.0,0.0);
       
       if (CGSizeEqualToSize(imageSize, targetSize) == NO) {
          
          CGFloat widthFactor = targetWidth / width;
          CGFloat heightFactor = targetHeight / height;
          
          if (widthFactor < heightFactor) 
             scaleFactor = widthFactor;
          else
             scaleFactor = heightFactor;
          
          scaledWidth  = width * scaleFactor;
          scaledHeight = height * scaleFactor;
          
          // center the image
          
          if (widthFactor < heightFactor) {
             thumbnailPoint.y = (targetHeight - scaledHeight) * 0.5; 
          } else if (widthFactor > heightFactor) {
             thumbnailPoint.x = (targetWidth - scaledWidth) * 0.5;
          }
       }
       
       
       // this is actually the interesting part:
       
       UIGraphicsBeginImageContext(targetSize);
       
       CGRect thumbnailRect = CGRectZero;
       thumbnailRect.origin = thumbnailPoint;
       thumbnailRect.size.width  = scaledWidth;
       thumbnailRect.size.height = scaledHeight;
       
       [sourceImage drawInRect:thumbnailRect];
       
       newImage = UIGraphicsGetImageFromCurrentImageContext();
       UIGraphicsEndImageContext();
       
       if(newImage == nil) NSLog(@"could not scale image");
       
       
       return newImage ;
    }




    - (UIImage *)imageByScalingToSize:(CGSize)targetSize {
       
       UIImage *sourceImage = self;
       UIImage *newImage = nil;
       
       //   CGSize imageSize = sourceImage.size;
       //   CGFloat width = imageSize.width;
       //   CGFloat height = imageSize.height;
       
       CGFloat targetWidth = targetSize.width;
       CGFloat targetHeight = targetSize.height;
       
       //   CGFloat scaleFactor = 0.0;
       CGFloat scaledWidth = targetWidth;
       CGFloat scaledHeight = targetHeight;
       
       CGPoint thumbnailPoint = CGPointMake(0.0,0.0);
       
       // this is actually the interesting part:
       
       UIGraphicsBeginImageContext(targetSize);
       
       CGRect thumbnailRect = CGRectZero;
       thumbnailRect.origin = thumbnailPoint;
       thumbnailRect.size.width  = scaledWidth;
       thumbnailRect.size.height = scaledHeight;
       
       [sourceImage drawInRect:thumbnailRect];
       
       newImage = UIGraphicsGetImageFromCurrentImageContext();
       UIGraphicsEndImageContext();
       
       if(newImage == nil) NSLog(@"could not scale image");
       
       
       return newImage ;
    }




    - (UIImage *)imageRotatedByRadians:(CGFloat)radians
    {
       return [self imageRotatedByDegrees:RadiansToDegrees(radians)];
    }


    - (UIImage *)imageRotatedByDegrees:(CGFloat)degrees 
    {   
       // calculate the size of the rotated view's containing box for our drawing space
       UIView *rotatedViewBox = [[UIView alloc] initWithFrame:CGRectMake(0,0,self.size.width, self.size.height)];
       CGAffineTransform t = CGAffineTransformMakeRotation(DegreesToRadians(degrees));
       rotatedViewBox.transform = t;
       CGSize rotatedSize = rotatedViewBox.frame.size;
       [rotatedViewBox release];
       
       // Create the bitmap context
       UIGraphicsBeginImageContext(rotatedSize);
       CGContextRef bitmap = UIGraphicsGetCurrentContext();
       
       // Move the origin to the middle of the image so we will rotate and scale around the center.
       CGContextTranslateCTM(bitmap, rotatedSize.width/2, rotatedSize.height/2);
       
       //   // Rotate the image context
       CGContextRotateCTM(bitmap, DegreesToRadians(degrees));
       
       // Now, draw the rotated/scaled image into the context
       CGContextScaleCTM(bitmap, 1.0, -1.0);
       CGContextDrawImage(bitmap, CGRectMake(-self.size.width / 2, -self.size.height / 2, self.size.width, self.size.height), [self CGImage]);
       
       UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
       UIGraphicsEndImageContext();
       return newImage;
       
    }


    @end;
    展开全文
  • iOS 图片编辑——涂鸦

    千次阅读 2016-03-12 18:16:15
    iOS图片编辑前面我们讲了 图片的缩放 旋转: http://blog.csdn.net/lwjok2007/article/details/50845510 滤镜:http://blog.csdn.net/lwjok2007/article/details/50853878 接下来我们要讲图片的涂鸦,我们分开一点...

    iOS图片编辑前面我们讲了

    图片的缩放 旋转: http://blog.csdn.net/lwjok2007/article/details/50845510

    滤镜:http://blog.csdn.net/lwjok2007/article/details/50853878

    接下来我们要讲图片的涂鸦,我们分开一点一点拓展,先给图片上划线

    创建项目 起名testAddLine





    接下来我们在默认生成的ViewController中添加一张图片 待用

    同时添加一个按钮 

    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        
        UIImageView *imageV = [[UIImageView alloc]initWithFrame:CGRectMake(10, 120, screen_Width-20, screen_Height-150)];
        imageV.image = [UIImage imageNamed:@"640-960-1.jpg"];
        [self.view addSubview:imageV];
        
        UIButton *testBtn = [[UIButton alloc]initWithFrame:CGRectMake(screen_Width/2.0-60, 60, 120, 36)];
        [testBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [testBtn setTitle:@"添加直线" forState:UIControlStateNormal];
        [testBtn addTarget:self action:@selector(addLineAct:) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:testBtn];
    }
    
    - (void)addLineAct:(id)sender{
        NSLog(@"测试按钮");
    }
    

    接下来我们创建一个UIView 用来添加直线 起名:DrawLine


    创建几个变量

    @property(nonatomic,strong) NSMutableArray * completeLines; //已经画好的线条 存入数组
    @property(nonatomic,strong) NSMutableDictionary* LinesInProscess; //正在画的线条 存入字典
    @property(nonatomic,strong) UIColor *lineColor;//线条颜色
    @property (nonatomic)float lineWidth;//线条的粗细


    初始化DrawLine
    //初始化
    - (id)initWithFrame:(CGRect)frame{
        if (self = [super initWithFrame:frame]) {
            //初始化变量
            _completeLines = [[NSMutableArray alloc]init];
            _LinesInProscess = [[NSMutableDictionary alloc]init];
            //设置透明背景
            self.backgroundColor = [UIColor clearColor];
            
        }
        
        return  self;
    }
    

    我们把线条单独抽象出来 创建一个类 创建对象 起名 Line


    线条 两个属性 起始点 结束点(这就是数学中的两点确定一条直线) 

    给Line 类创建两个属性

    #import <Foundation/Foundation.h>
    #import <UIKit/UIKit.h>
    
    @interface Line : NSObject
    
    @property(nonatomic)CGPoint begin; //线条开始点
    
    @property(nonatomic)CGPoint end; //线条结束点
    
    @end
    

    接下来 我们重写DrawLine 的  drawRect 方法  绘制线条

    // Only override drawRect: if you perform custom drawing.
    // An empty implementation adversely affects performance during animation.
    - (void)drawRect:(CGRect)rect {
        // Drawing code
        
        //获取上下文
        CGContextRef cgt=UIGraphicsGetCurrentContext();
        //设置线条宽度
        CGContextSetLineWidth(cgt, self.lineWidth);
        //设置线条两端形状为圆角
        CGContextSetLineCap(cgt, kCGLineCapRound);
        
        //设置颜色
        [self.lineColor set];
        //绘制已经完成的线段
        for (Line *line in _completeLines){
            CGContextMoveToPoint(cgt, [line begin].x, [line begin].y);
            CGContextAddLineToPoint(cgt, [line end].x, [line end].y );
            CGContextStrokePath(cgt);
        }
        
        
        //绘制正在画的线段
        for (NSArray *v in _LinesInProscess) {
            Line *line =[_LinesInProscess objectForKey:v];
            CGContextMoveToPoint(cgt, [line begin].x, [line begin].y);
            CGContextAddLineToPoint(cgt, [line end].x, [line end].y );
            CGContextStrokePath(cgt);
        }
        
    }
    


    实现几个手指滑动方法 用来接受手指的位置画线

    //清空画板
    -(void)clearAll
    {
        [_completeLines removeLastObject];
        [_LinesInProscess removeAllObjects];
        [self setNeedsDisplay];
    }
    
    
    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event
    {
        //判断是否连按
        for (UITouch *t in touches) {
            if ([t tapCount]>1) {
                //第二次画线时第一条线还未完成时结束画线
                [self clearAll];
                return;
            }
            
            //NSValue 作为键使用
            NSValue *key=[NSValue valueWithNonretainedObject:t];
            
            // 根据触摸位置创建Line对象
            CGPoint loc=[t locationInView:self];
            Line *newLine=[[Line alloc]init ];
            newLine.begin=loc;
            newLine.end=loc;
            //将当前正在画的线存入字典
            [_LinesInProscess setObject:newLine forKey:key];
            
        }
    }
    
    -(void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
    {
        //手指移动过程中按照当前手指的位置动态更新线条
        for (UITouch * t in touches) {
            NSValue *key=[NSValue valueWithNonretainedObject:t];
            // 找对象当前UITouch对象的Line对象
            Line *line =[_LinesInProscess objectForKey:key];
            
            CGPoint loc=[t locationInView:self];
            line.end=loc;
        }
        [self setNeedsDisplay];
    }
    
    -(void)endTouches:(NSSet *) touches
    {
        //画线完成之后将当前线条加入_completeLines 数组中 同时删除字典_LinesInProscess里的线条
        for (UITouch *t in touches) {
            NSValue *key=[NSValue valueWithNonretainedObject:t];
            Line *line =[_LinesInProscess objectForKey:key];
            if (line) {
                [_completeLines addObject:line];
                [_LinesInProscess removeObjectForKey:key];
            }
        }
        [self setNeedsDisplay];
    }
    
    -(void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
    {
        [self endTouches:touches];
    }
    
    -(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
    {
        [self endTouches:touches];
    }
    


    回到 ViewController中 给按钮点击事件中 添加DrawLine到ImageView上

    - (void)addLineAct:(id)sender{
        NSLog(@"测试按钮");
        
        DrawLine *touchdrawView = [[DrawLine alloc]initWithFrame:imageV.frame];
    
        touchdrawView.lineColor = [UIColor yellowColor];
        touchdrawView.lineWidth = 5.0;
        touchdrawView.tag = 902;
        [self.view addSubview:touchdrawView];
        
        
    }

    好了 运行程序试试

    点击 添加直线 按钮之后 试试在图片上画线


    好了 添加线段就先讲到这里  源代码 我会上传到群空间   

    大家有兴趣可以去下载

    下节我们将给线段末尾加上一个箭头:http://blog.csdn.net/lwjok2007/article/details/50885376

    demo:【60312图片上画线AddLine.zip】

    苹果开发群 :414319235  欢迎加入,共同学习

    展开全文
  • iOS 图片编辑——滤镜

    千次阅读 2016-03-11 11:02:39
    iOS中涉及图片编辑中最常见的一种就是滤镜 如下图 首先 ,我们打开Xcode 新建项目  起名:testImageFilterProcess1 拖入几个必要代码(见demo。demo下载地址见QQ群空间:414319235) 拖入过程...

    iOS中涉及图片编辑中最常见的一种就是滤镜 如下图

    有关图片缩放剪切功能参见:http://blog.csdn.net/lwjok2007/article/details/50845510


    首先 ,我们打开Xcode 新建项目 

    起名:testImageFilterProcess1



    拖入几个必要代码(见demo。demo下载地址见QQ群空间:414319235)


    拖入过程弹出的选择框选择如下


    接下来,我们在默认生成的ViewController中写代码

    创建一个变量 用来显示图片

        UIImageView * imageView;
    创建两个button 分别用来拍照 和处理照片
    - (void)viewDidLoad {
        [super viewDidLoad];
        // Do any additional setup after loading the view, typically from a nib.
        UIButton *btn=[[UIButton alloc]initWithFrame:CGRectMake(50, 50, 100, 50)];
        [btn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [btn setTitle:@"拍照" forState:UIControlStateNormal];
        [btn addTarget:self action:@selector(btnClick) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:btn];
        
        
        UIButton *btn1=[[UIButton alloc]initWithFrame:CGRectMake(self.view.bounds.size.width-150, 50, 100, 50)];
        [btn1 setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
        [btn1 setTitle:@"滤镜" forState:UIControlStateNormal];
        [btn1 addTarget:self action:@selector(btn1Click) forControlEvents:UIControlEventTouchUpInside];
        [self.view addSubview:btn1];
        
        imageView=[[UIImageView alloc]initWithFrame:CGRectMake(10, 120, self.view.bounds.size.width-20, self.view.bounds.size.height-130)];
        imageView.image=[UIImage imageNamed:@"320-480.png"];
        [self.view addSubview:imageView];
        
        
    }

    最终界面如下

    实现拍照按钮点击事件

    -(void)btnClick{
        
        UIActionSheet *actionSheet;
        actionSheet = [[UIActionSheet alloc]initWithTitle:@"请选择" delegate:self cancelButtonTitle:@"取消" destructiveButtonTitle:nil otherButtonTitles:@"照相机",@"相册", nil];
        actionSheet.delegate=self;
        [actionSheet showInView:self.view];
    }
    
    -(void)actionSheet:(UIActionSheet *)actionSheet didDismissWithButtonIndex:(NSInteger)buttonIndex{
        
        if (buttonIndex==0) {
            UIImagePickerController *imagePicker=[[UIImagePickerController alloc]init];
            imagePicker.allowsEditing=YES;
            imagePicker.sourceType=UIImagePickerControllerSourceTypeCamera;
            imagePicker.delegate=self;
            [self presentViewController:imagePicker animated:false completion:nil];
        }else if (buttonIndex==1){
            UIImagePickerController *imagePicker=[[UIImagePickerController alloc]init];
            imagePicker.allowsEditing=YES;
            imagePicker.sourceType=UIImagePickerControllerSourceTypePhotoLibrary;
            imagePicker.delegate=self;
            [self presentViewController:imagePicker animated:false completion:nil];
        }
    }

    imagePickerController 代理方法

    -(void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info
    {
        [picker dismissViewControllerAnimated:true completion:nil];
        UIImage *image;
        image=[info valueForKey:UIImagePickerControllerOriginalImage];
        image=[self clipImageWithScaleWithsize:CGSizeMake(320, 480) image:image];
        
        imageView.image=image;
    }
    
    -(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker{
        
        [picker dismissViewControllerAnimated:true completion:nil];
        NSLog(@"pickerpickerpicker=%@",picker);
    }


    去掉图片之后要用如下方法处理一下 否则会因为内存过大而崩掉

    - (UIImage *)clipImageWithScaleWithsize:(CGSize)asize image:(UIImage *) image
    {
        UIImage *newimage;
        if (nil == image) {
            newimage = nil;
        }
        else{
            CGSize oldsize = image.size;
            CGRect rect;
            if (asize.width/asize.height > oldsize.width/oldsize.height) {
                rect.size.width = asize.width;
                rect.size.height = asize.width*oldsize.height/oldsize.width;
                rect.origin.x = 0;
                rect.origin.y = (asize.height - rect.size.height)/2;
            }
            else{
                rect.size.width = asize.height*oldsize.width/oldsize.height;
                rect.size.height = asize.height;
                rect.origin.x = (asize.width - rect.size.width)/2;
                rect.origin.y = 0;
            }
            UIGraphicsBeginImageContext(asize);
            CGContextRef context = UIGraphicsGetCurrentContext();
            CGContextClipToRect(context, CGRectMake(0, 0, asize.width, asize.height));
            CGContextSetFillColorWithColor(context, [[UIColor clearColor] CGColor]);
            UIRectFill(CGRectMake(0, 0, asize.width, asize.height));//clear background
            [image drawInRect:rect];
            newimage = UIGraphicsGetImageFromCurrentImageContext();
            UIGraphicsEndImageContext();
        }
        return newimage;
    }

    接下来 实现滤镜按钮点击的事件

    -(void)btn1Click{
        
        ImageFilterProcessViewController *fitler = [[ImageFilterProcessViewController alloc] init];
        [fitler setDelegate:self];
        fitler.currentImage = imageView.image;
        [self presentModalViewController:fitler animated:YES];
        
    }

    实现一下滤镜的代理方法 获取修改完成的图片

    - (void)imageFitlerProcessDone:(UIImage *)image //图片处理完
    {
        imageView.image=image;
    }

    好了 到此基本完成 运行试试


    源代码将上传到群空间 有兴趣的下载看看

    demo:【60311图片滤镜ImageFilterProcess1.zip】
    苹果开发群 :414319235  欢迎加入,共同学习

    展开全文
  • ios的学习在蓝懿另个月了,感觉学到了很多,这里的环境不错学习氛围也很好,刘国斌老师教了图片编辑,模拟美图秀秀,功能实现了边框,效果。滤镜,还有涂鸦。 #pragma mark - Image picker controller 协议方法 - ...

    ios的学习在蓝懿另个月了,感觉学到了很多,这里的环境不错学习氛围也很好,刘国斌老师教了图片编辑,模拟美图秀秀,功能实现了边框,效果。滤镜,还有涂鸦。
    #pragma mark - Image picker controller 协议方法

    - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary<NSString *,id> *)info{

       /*****   初始化并跳转到 Editing view controller   *****/

       // 进入 Storyboard 问价内, 获取到某个 View Controller (initWithCoder 初始化方法)

       // 后面的 id 是在 Storyboard 中设置的 "Storyboard ID"//

       // ______如果是用纯代码方式写出来的,就不用这样,直接alloc,init初始化

       bianJi_bViewController *bian=[self.storyboardinstantiateViewControllerWithIdentifier:@"hehe"];

       bian.selectedImage=info[UIImagePickerControllerOriginalImage];

        // 因为当前 View controller 没有被导航栏所管理, 所以无法使用 self.navigationController 来跳转页面. 但由于 UIImagePickerController 是导航控制器的子类, 所以可以直接使用UIImagePickerController 的实力对象来跳转页面(即 picker 参数)

       [picker presentViewController:bian animated:YES completion:nil];

     

       

    }

     

    转载于:https://www.cnblogs.com/lanyisanqqi/p/5152595.html

    展开全文
  • iOS图片编辑功能实现

    2016-05-26 16:56:00
    图片加标签;标签可以编辑 https://github.com/shumingli/waterMark 1. 编辑效果;图片可以放到、缩小、旋转 2. 保存相册效果 转载于:https://www.cnblogs.com/lishuming/p/5531786.html...
  • iOS 图片编辑——缩放剪切

    千次阅读 2016-03-10 12:39:58
    iOS项目中 如果涉及编辑图片的 可能首先会用到就是图片的缩放 这里我们给大家共享一个开源代码 实现图片的缩放,旋转,按照设定比例调整缩放等功能   首先我们使用Xcode 新建一个项目 起名 tetsImageEdit1 ...
  • IOS中调用系统图片通常是多选图片。可以先看一下系统图片选择器介绍: http://blog.csdn.net/lee727n/article/details/72454687 接下来我们来看一下多选图片 我们需要借助一个三方PhotoBrowser,下面的程序是我将...
  • 蓝懿IOS图片编辑模块

    2016-01-24 23:54:00
    今天刘国斌老师讲了关于怎么编辑图片的各种板式,如何把代码里的数据转成data再存到本地的文件,之后再取出来用。感觉这些比较难理解,课后也是用好多的事件进行练习,今天上午同样讲了怎样创建一个服务器,去核多个...
  • iOS图片编辑(CIFilter)

    千次阅读 2015-11-30 11:23:47
    iOS中开发过程中,如果你想对图片进行简单的处理,那么很简单,苹果帮我们封装了一套简单易用的API——CIFilter。 使用CIFilter你可以做到:调节图片亮度、对比度、饱和度等图片基本的操作;使用模糊、锐化、高...
  • ios个人信息修改及图片编辑功能,包含个人信息界面,个人修改界面,照片选择编辑
  • 自定义相机 图片裁剪 图片编辑 gif图有点大, 不能上传 点击浏览 https://github.com/zhao560/customCamera/blob/dev_1.0/1.gif 觉得好用请给个星星 guthub地址 https://github.com/zhao560/customCamera
  • ios开发:图片编辑

    2014-01-10 14:39:31
    //裁剪图片的方法- (UIImage*)cutImage:(UIImage*)superImage withRect:(CGRect)rect{ CGImageRef imageRef = superImage.CGImage; CGImageRef subImageRef = CGImageCreateWithImageInRect(imageRef, rect); ...
  • 在选中图片时 出现编辑框 在图片一角 生成按钮 点住按钮 实现图片旋转或缩放 这种效果怎么做呀 求大神解答 最好能给个demo 谢谢了
  • 前面几节讲了图片上画线 这一节 我们简单讲一讲 给图片上添加文字的方法 我们继续使用上节的代码(代码下载地址见上节末尾 http://blog.csdn.net/lwjok2007/article/details/50887396) 首先我们将添加文字的View...
  • ios图片编辑(看这个就够了!)

    万次阅读 2017-12-13 14:44:52
    今天给大家带来的是封装的一个ios图片编辑工具,支持图片裁剪、添加滤镜、色度调节、马赛克、方向旋转、文字和图片水印等功能。如果需要的话希望能帮到你 , 当然, 有任何不妥的地方 欢迎指正 demo地址--------...
  • iOS 自定义相册图片编辑页面

    万次阅读 2014-12-01 18:29:42
    //从相册中选取图片或拍照 - (void)btnActionForEditPortrait:(id) sender {  UIImagePickerController *picker = [[UIImagePickerController alloc] init];  picker.delegate = self;  picker....
  • ios应用源码之一个简单的图片编辑器 .
  • 评论,文字输入,图片选择的功能的实现,希望大家多提宝贵意见,多多交流,q
  • iOS - UITableViewCell 改变编辑状态图片

    千次阅读 2017-01-13 16:41:32
    UITableViewCell 是编辑状态时 会出现多选按钮,最近项目有需求这里要改成自己的图片和去掉一下点击效果,总结一下: 自带的效果图是这样的: 我们需要的效果是换掉 蓝色的选中图片和点击的背景颜色...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 697
精华内容 278
关键字:

ios编辑图片