老牌影像界泰斗不甘落寞,正式推出了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
路径:AdobeCreativeSDKCore.framework > Resources > AdobeCreativeSDKCoreResources.bundle 拷贝至项目
同上AdobeCreativeSDKImage.framework > Resources > AdobeCreativeSDKImageResources.bundle
需要添加的还有
・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
・<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 */
创建应用地址: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