本Demo是以前写的仿Prisma,通过AVFoundation
自定义相机UI、CIFilter
实现滤镜的、二维码扫描
等,分享出来可能会对有需要的人有些帮助,下面上功能
使用的CIFilter功能有
- (NSArray *)filters {
return @[
@{
@"name":@"原图",
@"filter":@"Origin"
},
@{
@"name":@"怀旧",
@"filter":@"CIPhotoEffectInstant"
},
@{
@"name":@"黑白",
@"filter":@"CIPhotoEffectNoir"
},
@{
@"name":@"灰调",
@"filter":@"CIPhotoEffectTonal"
},
@{
@"name":@"岁月",
@"filter":@"CIPhotoEffectTransfer"
},
@{
@"name":@"单色",
@"filter":@"CIPhotoEffectMono"
},
@{
@"name":@"褪色",
@"filter":@"CIPhotoEffectFade"
},
@{
@"name":@"冲印",
@"filter":@"CIPhotoEffectProcess"
},
@{
@"name":@"铬黄",
@"filter":@"CIPhotoEffectChrome"
},
@{
@"name":@"色调",
@"filter":@"CIHueAdjust",
},
@{
@"name":@"老电影",
@"filter":@"CISepiaTone"
},
@{
@"name":@"反色",
@"filter":@"CIColorInvert"
},
@{
@"name":@"饱和",
@"filter":@"CIColorControls"
},
@{
@"name":@"矩阵",
@"filter":@"CIColorMatrix"
},
@{
@"name":@"曝光",
@"filter":@"CIExposureAdjust"
},
@{
@"name":@"温度",
@"filter":@"CITemperatureAndTint"
},
@{
@"name":@"振动",
@"filter":@"CIVibrance"
},
@{
@"name":@"凹凸",
@"filter":@"CIBumpDistortion"
},
// @{
// @"name":@"二维码",
// @"filter":@"CIQRCodeGenerator"
// },
// @{
// @"name":@"高斯渐变",
// @"filter":@"CIHeightFieldFromMask"
// },
@{
@"name":@"高亮",
@"filter":@"CIHighlightShadowAdjust"
},
@{
@"name":@"描边",
@"filter":@"CILineOverlay"
},
@{
@"name":@"模糊",
@"filter":@"CIGaussianBlur"
},
];
}
网友评论