{"id":13643858,"url":"https://github.com/Zomato/AndroidPhotoFilters","last_synced_at":"2025-04-21T06:31:56.931Z","repository":{"id":39916150,"uuid":"60839877","full_name":"Zomato/AndroidPhotoFilters","owner":"Zomato","description":"AndroidPhotoFilters aims to provide fast, powerful and flexible image processing instrument for creating awesome effects on any image media.","archived":false,"fork":false,"pushed_at":"2023-07-18T15:49:27.000Z","size":2733,"stargazers_count":2518,"open_issues_count":41,"forks_count":481,"subscribers_count":81,"default_branch":"master","last_synced_at":"2025-04-13T21:34:02.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Zomato.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}},"created_at":"2016-06-10T10:23:49.000Z","updated_at":"2025-03-23T14:21:24.000Z","dependencies_parsed_at":"2022-08-02T23:46:17.747Z","dependency_job_id":"5251526f-88ad-48f4-9ea7-738e96198045","html_url":"https://github.com/Zomato/AndroidPhotoFilters","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zomato%2FAndroidPhotoFilters","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zomato%2FAndroidPhotoFilters/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zomato%2FAndroidPhotoFilters/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Zomato%2FAndroidPhotoFilters/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Zomato","download_url":"https://codeload.github.com/Zomato/AndroidPhotoFilters/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250008219,"owners_count":21359949,"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":[],"created_at":"2024-08-02T01:01:53.873Z","updated_at":"2025-04-21T06:31:54.912Z","avatar_url":"https://github.com/Zomato.png","language":"Java","readme":"# PhotoFiltersSDK\n\n[![License](https://img.shields.io/badge/license-Apache%202-4EB1BA.svg?style=flat-square)](https://www.apache.org/licenses/LICENSE-2.0.html)\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-AndroidPhotoFilters-brightgreen.svg?style=flat)](http://android-arsenal.com/details/1/3703)\n\nPhotoFiltersSDK aims to provide fast, powerful and flexible image processing instrument for creating awesome effects on any image media. \n\nLibrary supports OS on API 15 and above.\n\n![PhotoFilters gif](art/photofilters.gif)\n\n## Features\nPhotoFiltersSDK processes filter on any Image within fraction of second since processing logic is in NDK. At present following image filters are included: \n\n* **[ToneCurveSubfilter](#tonecurve) :** With this powerful filter you can change RGB channels of any image to create great results.\n* **[SaturationSubfitler](#saturation) :** Used for changing color saturation of an image.\n* **[ColorOverlaySubfilter](#coloroverlay) :** As name suggests you can overlay any image with color of your choice.\n* **[ContrastSubfilter](#contrast) :** Used for changing contrast value of image.\n* **[BrightnessSubfilter](#brightness) :** To change brightness levels.\n* **[VignetteSubfilter](#vignette) :** To apply vignette effect on image. \n\nLibrary also comes with inbuilt Sample Filters (Refer [SampleFitlers.java](photofilterssdk/src/main/java/com/zomato/photofilters/SampleFilters.java)). Implementation is straightforward: \n\n```java\nFilter fooFilter = SampleFilters.getBlueMessFilter();\nBitmap outputImage = fooFilter.processFilter(inputImage);\n```\n\n## Implementation\n\n### Adding Dependency\n\nSimply add Dependency on artifact in your `build.gradle` : \n\n```gradle\ndependencies {\n    compile 'com.github.zomato:androidphotofilters:1.0.2'\n    ...\n```\n\n**OR** \n\nCopy|Paste  photofilterssdk from the repo to your project and include photofiltersdk in your `settings.gradle` like this :\n\n```gradle\ninclude ':photofilterssdk'\n```\nAdd dependency in your `build.gradle` :\n\n```gradle\ncompile project(':photofilterssdk')\n```\n\n### Usage\n\nLoad native library in your activity :\n\n```java\npublic class MainActivity extends AppCompatActivity {\n    static\n    {\n        System.loadLibrary(\"NativeImageProcessor\");\n    }\n    ...\n```\n\nthen\n\n```java\nFilter myFilter = new Filter();\nmyFilter.addSubFilter(new BrightnessSubFilter(30));\nmyFilter.addSubFilter(new ContrastSubFilter(1.1f));\nBitmap outputImage = myFilter.processFilter(inputImage);\n```\n\nAbove code snippet will give you outputImage with increased brightness and contrast. You can further refer [example project](example).\n\n## Documentation\nAlthough there are few inbuilt filters already present, you may want to create and customize one specific to your need and show your creativity. For that you would require to know how all the Subfilters can be used. Let me take you through all of them.\n\n### \u003ca name=\"tonecurve\"\u003e\u003c/a\u003eToneCurveSubfilter\nThis is most awesome filter present in this library which differentiates **PhotoFiltersSDK** from other image processing libraries out there. ToneCurveSubFilter applies the changed RGB Channel curve to create effect on image.\n\n![CurveDialog](art/curvedialog_photoshop.png)\n\nHere is the code snippet the apply the above RGB curve on an image : \n\n```java\nFilter myFilter = new Filter();\nPoint[] rgbKnots;\nrgbKnots = new Point[3];\nrgbKnots[0] = new Point(0, 0);\nrgbKnots[1] = new Point(175, 139);\nrgbKnots[2] = new Point(255, 255);\n       \nmyFilter.addSubFilter(new ToneCurveSubfilter(rgbKnots, null, null, null));\nBitmap outputImage = myFilter.processFilter(inputImage);\n```\n\nThe results are nearly same as we would see in photoshop and other tools. We can also specify knots for Red, Green and Blue channels (in the ToneCurveSubfilter's constructor).\n\n### \u003ca name=\"saturation\"\u003e\u003c/a\u003eSaturationSubfilter\nThis fitler can be used to tweak color saturation of an image. Here is the example : \n\n```java\nFilter myFilter = new Filter();\nmyFilter.addSubFilter(new SaturationSubfilter(1.3f));\nBitmap outputImage = myFilter.processFilter(inputImage);\n```\n\nSaturationSubfilter takes float as an argument and has no effect for value 1.\n\n### \u003ca name=\"coloroverlay\"\u003e\u003c/a\u003eColorOverlaySubfilter\nIncreases the specified red, green and blue values for each pixel in an image.\n\n```java\nFilter myFilter = new Filter();\nmyFilter.addSubFilter(new ColorOverlaySubfilter(100, .2f, .2f, .0f));\nBitmap outputImage = myFilter.processFilter(inputImage);\n```\n\n### \u003ca name=\"contrast\"\u003e\u003c/a\u003eContrastSubfilter\nTo change the contrast levels of an image use this filter : \n\n```java\nFilter myFilter = new Filter();\nmyFilter.addSubFilter(new ContrastSubfilter(1.2f));\nBitmap outputImage = myFilter.processFilter(inputImage);\n```\n\nContrastSubfilter takes float as an argument where value 1 has no effect on the image.\n\n### \u003ca name=\"brightness\"\u003e\u003c/a\u003eBrightnessSubfilter\nAs the name suggest, this filter is used for changing brightness levels : \n\n```java\nFilter myFilter = new Filter();\nmyFilter.addSubFilter(new BrightnessSubfilter(30));\nBitmap ouputImage = myFilter.processFilter(inputImage);\n```\nBrightnessSubfilter takes int as an argument where value 0 has no effect. Negative values can be used to decrease brightness of the image.\n\n### \u003ca name=\"vignette\"\u003e\u003c/a\u003eVignetteSubfilter\nThis filter can be used to put vignette effect on the image. \n\n```java\nFilter myFilter = new Filter();\nmyFilter.addSubFilter(new VignetteSubfilter(context, 100));\nBitmap outputImage = myFilter.processFilter(inputImage);\n```\n\nVignetteSubfilter takes int as an argument whoes value ranges from 0-255, which defines intesity of the vignette effect.\n\n## Proguard\nIf you are using proguard, consider adding the following to your proguard rules:\n\n```proguard\n-keep class com.zomato.photofilters.** {*;}\n-keepclassmembers  class com.zomato.photofilters.** {*;}\n```\n\n## License\nThis library falls under [Apache v2](LICENSE)\n","funding_links":[],"categories":["图片"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZomato%2FAndroidPhotoFilters","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FZomato%2FAndroidPhotoFilters","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FZomato%2FAndroidPhotoFilters/lists"}