• 裁切图片,


    - (void)webImageManager:(SDWebImageManager *)imageManager didFinishWithImage:(UIImage *)image

    {

        CGSize targetSize = CGSizeMake(image.size.width*4/sqrt(5.0f),

                                       image.size.width*2/sqrt(5.0f));

        UIGraphicsBeginImageContext(targetSize);

        [image drawInRect:CGRectMake(image.size.width*(1/sqrt(5.0f)*2-1),

                                     image.size.width*(1/sqrt(5.0f)-1),

                                     image.size.width*2,

                                     image.size.height*2)];

        image = UIGraphicsGetImageFromCurrentImageContext();

        UIImage *blurredImage = [self blurryImage: image withBlurLevel: 0.1];

        [self.bgImageView setImage:blurredImage];

        [selfsetNeedsLayout];

    }

  • 相关阅读:
    C#
    C#
    C#
    C#
    C#
    C#
    系统工具
    远程登录
    文件传输服务
    软件安装
  • 原文地址:https://www.cnblogs.com/guligei/p/3345795.html
Copyright © 2020-2023  润新知