移动端影像解决方案Adobe Creative SDK for ios
老牌影像界泰斗不甘落寞,正式推出了Adobe Creative SDK for iOS or Android
让你的APP拥有超强的图形处理能力变得简单且轻松。
几乎包含了绝大多数超豪华滤镜及处理工具,实装也非常简单。
废话不说,我们还是一起来看些例子吧
图片色彩滤镜
滤镜的种类丰富,实装后通过简单选取拖拽就可以应用各种效果。
图像裁剪
图像方向调整
文字输入
局部颜色
安装方法
swift语法,因此使用Objective-C需要尽快过渡至新语法
例子下载地址:https://github.com/yamasakitomohiro/AdobeCreativeSample
Adobe Creative SDK
SDK下载地址:https://creativesdk.adobe.com/downloads.html
Other Linker Flags设定
AdobeCreativeSDKCoreResourcesSDK.bundle 引入
路径:AdobeCreativeSDKCore.framework > Resources > AdobeCreativeSDKCoreResources.bundle 拷贝至项目
AdobeCreativeSDKImageResources.bundle 引入
同上AdobeCreativeSDKImage.framework > Resources > AdobeCreativeSDKImageResources.bundle
AdobeCreativeSDKImage.framework 引入同上
需要添加的还有
・libc++.dylib
・libz.dylib
・MobileCoreServices.framework
・SystemConfiguration.framework
・Accelerate.framework
・CoreData.framework
・libsqlite3.0.dylib
・libz.1.2.5.dylib
・MessageUI.framework
・OpenGLES.framework
・QuartzCore.framework
・StoreKit.framework
BridgingHeader
・<AdobeCreativeSDKCore/AdobeCreativeSDKCore.h>
・<AdobeCreativeSDKImage/AdobeCreativeSDKImage.h>
AdobeCreative-Bridging-Header.h #ifndef AdobeCreative_Bridging_Header_h #define AdobeCreative_Bridging_Header_h #import <AdobeCreativeSDKCore/AdobeCreativeSDKCore.h> #import <AdobeCreativeSDKImage/AdobeCreativeSDKImage.h> #endif /* AdobeCreative_Bridging_Header_h */
SDK的使用[ SECRET KEY ]和[ ] CLIENT ID需要进行登记程序。
创建应用地址:https://creativesdk.adobe.com/myapps.html
初始设置
appDelegate追加一下初始化代码
AppDelegate.swift
func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { AdobeUXAuthManager.sharedManager().setAuthenticationParametersWithClientID("CLIENT ID", withClientSecret: "SECRET KEY") return true }
Adobe控制器启动
UIImage就这么简单开始工作
func open(sender: AnyObject) { let adobeViewCtr = AdobeUXImageEditorViewController(image: UIImage(named: "aiko_photo.jpg")) adobeViewCtr.delegate = self self.presentViewController(adobeViewCtr, animated: true) { () -> Void in } }
编辑图像
[AdobeUXImageEditorViewControllerDelegate] VC.swift
func photoEditor(editor: AdobeUXImageEditorViewController!, finishedWithImage image: UIImage!) { editor.dismissViewControllerAnimated(true, completion: nil) image } func photoEditorCanceled(editor: AdobeUXImageEditorViewController!) { editor.dismissViewControllerAnimated(true, completion: nil) }
定制
图标图像或改变,功能等,多少可以定制化。
相当功能丰富,所以实际使用情况这是不需要全部的东西,功能限制的方法。
显示标签的种类和排序
AdobeImageEditorCustomization.setToolOrder([
kAdobeImageEditorEnhance, /* Enhance */ kAdobeImageEditorEffects, /* Effects */ kAdobeImageEditorStickers, /* Stickers */ kAdobeImageEditorOrientation, /* Orientation */ kAdobeImageEditorCrop, /* Crop */ kAdobeImageEditorColorAdjust, /* Color */ kAdobeImageEditorLightingAdjust, /* Lighting */ kAdobeImageEditorSharpness, /* Sharpness */ kAdobeImageEditorDraw, /* Draw */ kAdobeImageEditorText, /* Text */ kAdobeImageEditorRedeye, /* Redeye */ kAdobeImageEditorWhiten, /* Whiten */ kAdobeImageEditorBlemish, /* Blemish */ kAdobeImageEditorBlur, /* Blur */ kAdobeImageEditorMeme, /* Meme */ kAdobeImageEditorFrames, /* Frames */ kAdobeImageEditorFocus, /* TiltShift */ kAdobeImageEditorSplash, /* ColorSplash */ kAdobeImageEditorOverlay, /* Overlay */ kAdobeImageEditorVignette /* Vignette */ ]) let adobeViewCtr = AdobeUXImageEditorViewController(image: UIImage(named: "aiko_photo.jpg")) adobeViewCtr.delegate = self self.presentViewController(adobeViewCtr, animated: true) { () -> Void in }
最后,如果有类似图片应用的工程师们可以去尝试一下,简单且强大的SDK