Adding the GPUImage to an existing Xcode project might be straight forward for some people, but if you have not added independent libraries from open sources, then it might be a bit confusing.
-First get the GPUImage source which can be found from the following url:
-Then add the source your own project. There are many ways to do it but in order to avoid confusions when scanning headers, I think the simplest way would look like this:
MyXcodeProject/framework/GPUImage.xcodeproj MyXcodeProject/framework/GPUImageTests MyXcodeProject/framework/Resources MyXcodeProject/framework/Source
-Open your main Xcode project
-Drag GPUImage.xocdeproj into the fFrameworks group. It can be whenever you want but since this a framework, it makes sense adding it here. Automatically it should add “GPUImage”, “GPUIMageTests”, “Frameworks”, and “Products” groups with its source files. If it is not adding automatically this 4 groups, then you are doing something wrong.
- Go to Your Project ->Targets ->Build Phases Tab -> Target Dependencies -> add GPUImage(GPUImage) -Go to General Tab, add "libGPUImage.a"
The available filters/effects are under GPUImage/Filters
Here is a sample for adding an effect to a picture
GPUImagePicture *imageSource = [[GPUImagePicture alloc] initWithImage:myUIImage]; GPUImageSepiaFilter *stillImageFilter = [[GPUImageSepiaFilter alloc] init]; [stillImageSource addTarget:stillImageFilter]; [stillImageSource processImage]; myUIImage = [stillImageFilter imageFromCurrentlyProcessedOutput]; [self.view addSubView:myUIImage];