{"id":17324377,"url":"https://github.com/wysaid/ios-gpuimage-plus","last_synced_at":"2025-04-06T22:12:11.064Z","repository":{"id":69994074,"uuid":"44366022","full_name":"wysaid/ios-gpuimage-plus","owner":"wysaid","description":"GPU accelerated image filters for iOS, based on OpenGL.","archived":false,"fork":false,"pushed_at":"2024-03-05T08:59:47.000Z","size":30724,"stargazers_count":252,"open_issues_count":18,"forks_count":71,"subscribers_count":22,"default_branch":"master","last_synced_at":"2025-03-30T21:08:04.673Z","etag":null,"topics":["cge","filter","gpuimage","libcge","opengl"],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wysaid.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-16T06:16:06.000Z","updated_at":"2025-01-16T07:04:57.000Z","dependencies_parsed_at":"2024-03-05T10:03:38.503Z","dependency_job_id":null,"html_url":"https://github.com/wysaid/ios-gpuimage-plus","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wysaid%2Fios-gpuimage-plus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wysaid%2Fios-gpuimage-plus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wysaid%2Fios-gpuimage-plus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wysaid%2Fios-gpuimage-plus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wysaid","download_url":"https://codeload.github.com/wysaid/ios-gpuimage-plus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247557770,"owners_count":20958047,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cge","filter","gpuimage","libcge","opengl"],"created_at":"2024-10-15T14:10:29.428Z","updated_at":"2025-04-06T22:12:11.041Z","avatar_url":"https://github.com/wysaid.png","language":"C++","readme":"# iOS-GPUImage-Plus \nGPU accelerated filters for iOS based on OpenGL. \n\n__New feature__: Face effects will be created with the ios11's `VNSequenceRequestHandler` \u0026 `VNDetectFaceLandmarksRequest`.\n\n\u003eAndroid version: [https://github.com/wysaid/android-gpuimage-plus](https://github.com/wysaid/android-gpuimage-plus \"http://wysaid.org\")\n\n## Abstract ##\n\n* This repo is open source now. You can use cge.framework in your project.\n\n    1. You can add the cge.framework to your project, then add the code\n    \u003e#import \u003ccge/cge.h\u003e\n    \u003e//Everything is done.\n\n    2. If you're using CocoaPods, add this to your Podfile:\n    \u003epod 'cge', :git =\u003e 'https://github.com/wysaid/ios-gpuimage-plus.git'\n\n    or with the latest static library:\n    \u003epod 'cge', :git =\u003e 'https://github.com/wysaid/ios-gpuimage-plus-pod.git', :tag =\u003e '2.5.1'\n\n    __Dependencies__:  libc++, ImageIO.framework, MobileCoreServices.framework\n\n    Note: The filters are written in C++, so you should change your source file extensions to \"mm\" if you want use all features. But it is not necessary when you're using the interface-headers just like the [demo](https://github.com/wysaid/ios-gpuimage-plus/tree/master/demo/cgeDemo).\n\n* Hundreds of built-in filters are available in the demo. 😋If you'd like to add your own filter, please take a look at the manual page. Or you can follow the demo code. The new custom filters should be written in C++.\n\n* To build the source code, you can use the xcode project in the 'library' folder.\n\n## Manual ##\n\n### 1. Usage ###\n\n___Sample Code for doing a filter with UIImage___\n```\n//Simply apply a filter to an UIImage.\n- (void)viewDidLoad\n{\n    UIImage* srcImage = [UIImage imageNamed:@\"test.jpg\"];\n    //HSL Adjust (hue: 0.02, saturation: -0.31, luminance: -0.17)\n    //Please see the manual for more details.\n    const char* ruleString = @\"@adjust hsl 0.02 -0.31 -0.17\";\n    UIImage* resultImage = cgeFilterUIImage_MultipleEffects(srcImage, ruleString, 1.0f, nil);\n\n    //Then the dstImage is applied with the filter.\n    //It's so convenient, isn't it?\n}\n```\n\n### 2. Custom Shader Filter ###\n\n#### 2.1 Write your own filter ####\n\u003eYour filter must inherit [CGEImageFilterInterfaceAbstract](https://github.com/wysaid/ios-gpuimage-plus/blob/master/library/cge/include/cgeImageFilter.h#L39) or its child class. Most of the filters are inherited from [CGEImageFilterInterface](https://github.com/wysaid/ios-gpuimage-plus/blob/master/library/cge/include/cgeImageFilter.h#L54) because it has many useful functions.\n\n```\n// A simple customized filter to do a color reversal.\nclass MyCustomFilter : public CGE::CGEImageFilterInterface\n{\npublic:\n    \n    bool init()\n    {\n        CGEConstString fragmentShaderString = CGE_SHADER_STRING_PRECISION_H\n        (\n        varying vec2 textureCoordinate;  //defined in 'g_vshDefaultWithoutTexCoord'\n        uniform sampler2D inputImageTexture; // the same to above.\n\n        void main()\n        {\n            vec4 src = texture2D(inputImageTexture, textureCoordinate);\n            src.rgb = 1.0 - src.rgb;  //Simply reverse all channels.\n            gl_FragColor = src;\n        }\n        );\n\n        //m_program is defined in 'CGEImageFilterInterface'\n        return m_program.initWithShaderStrings(g_vshDefaultWithoutTexCoord, s_fsh);\n    }\n\n    //void render2Texture(CGE::CGEImageHandlerInterface* handler, GLuint srcTexture, GLuint vertexBufferID)\n    //{\n    //  //Your own render functions here.\n    //  //Do not override this function to use the CGEImageFilterInterface's.\n    //}\n};\n```\n\n\u003eNote: To add your own shader filter with c++. [Please see the demo for further details](https://github.com/wysaid/ios-gpuimage-plus/blob/master/library/filterLib/CustomFilter_N.cpp).\n\n#### 2.2 Run your own filter ####\n\nPlease see this: [https://github.com/wysaid/ios-gpuimage-plus/blob/master/library/filterLib/cgeCustomFilters.h#L34](https://github.com/wysaid/ios-gpuimage-plus/blob/master/library/filterLib/cgeCustomFilters.h#L34)\n\n### 3. Filter Rule String ###\n\nEn: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-En](https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule-En \"http://wysaid.org\")\n\nCh: [https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule](https://github.com/wysaid/android-gpuimage-plus/wiki/Parsing-String-Rule \"http://wysaid.org\")\n\n## Tool ##\n\nSome utils are available for creating filters: [https://github.com/wysaid/cge-tools](https://github.com/wysaid/cge-tools \"http://wysaid.org\")\n\n[![Tool](https://raw.githubusercontent.com/wysaid/cge-tools/master/screenshots/0.jpg \"cge-tool\")](https://github.com/wysaid/cge-tools)\n\n## License ##\n\n[MIT License](https://github.com/wysaid/ios-gpuimage-plus/blob/master/LICENSE)\n\n## Donate ##\n\nAlipay:\n\n![Alipay](https://raw.githubusercontent.com/wysaid/ios-gpuimage-plus/master/screenshots/alipay.jpg \"alipay\")\n\nPaypal: \n\n[![Paypal](https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif \"Paypal\")](http://blog.wysaid.org/p/donate.html)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwysaid%2Fios-gpuimage-plus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwysaid%2Fios-gpuimage-plus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwysaid%2Fios-gpuimage-plus/lists"}