{"id":22933075,"url":"https://github.com/fthuin/nativescript-image-black-and-white","last_synced_at":"2026-04-30T01:36:37.544Z","repository":{"id":57308564,"uuid":"130469081","full_name":"fthuin/nativescript-image-black-and-white","owner":"fthuin","description":"NativeScript plugin to turn images into black-and-white images","archived":false,"fork":false,"pushed_at":"2018-04-21T13:19:21.000Z","size":2346,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-13T01:19:17.150Z","etag":null,"topics":["filter","images","nativescript","typescript"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/fthuin.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}},"created_at":"2018-04-21T11:53:57.000Z","updated_at":"2024-05-30T17:06:33.000Z","dependencies_parsed_at":"2022-08-28T23:12:38.554Z","dependency_job_id":null,"html_url":"https://github.com/fthuin/nativescript-image-black-and-white","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthuin%2Fnativescript-image-black-and-white","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthuin%2Fnativescript-image-black-and-white/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthuin%2Fnativescript-image-black-and-white/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthuin%2Fnativescript-image-black-and-white/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fthuin","download_url":"https://codeload.github.com/fthuin/nativescript-image-black-and-white/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246684986,"owners_count":20817535,"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":["filter","images","nativescript","typescript"],"created_at":"2024-12-14T11:19:47.925Z","updated_at":"2026-04-30T01:36:32.526Z","avatar_url":"https://github.com/fthuin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nativescript-image-black-and-white\n\nThis plugin allows you to put an image in black and white (also called gray scale filter). It is using native iOS and Android features, so it is very nice in terms of performance and **it does not contain any third-party library** so it is very small.\n\nOriginal             |  Modified\n:-------------------------:|:-------------------------:\n\u003cimg src=\"https://github.com/fthuin/nativescript-image-black-and-white/blob/master/screenshots/ios_before.jpg\" alt=\"ios-before\" width=\"250\"\u003e  |  \u003cimg src=\"https://github.com/fthuin/nativescript-image-black-and-white/blob/master/screenshots/ios_after.jpg\" alt=\"ios-after\" width=\"250\"\u003e\n\n\nOriginal             |  Modified\n:-------------------------:|:-------------------------:\n\u003cimg src=\"https://github.com/fthuin/nativescript-image-black-and-white/blob/master/screenshots/android_before.jpg\" alt=\"android-before\" width=\"250\"\u003e | \u003cimg src=\"https://github.com/fthuin/nativescript-image-black-and-white/blob/master/screenshots/android_after.jpg\" alt=\"android-after\" width=\"250\"\u003e\n\n## Installation\n\n```bash\ntns plugin add nativescript-image-black-and-white\n```\n\n## Usage\n\n```typescript\nimport { Image } from 'tns-core-modules/ui/image';\nimport { ImageBlackAndWhite } from 'nativescript-image-black-and-white';\n\nconst image: Image = ...; // Initialize or get your image\nconst imageBlackAndWhite = new ImageBlackAndWhite();\nimageBlackAndWhite.blackAndWhite(image);\n```\n\nDo not hesitate to look at the demo for a working example (screenshots come from there).\n\n## API\n\nThis library is very simple, you create a new instance of `ImageBlackAndWhite`, you call the only method which is `blackAndWhite` with a Nativescript Image as parameter.\n\n```\nclass ImageBlackAndWhite {\n    blackAndWhite(img: Image): void;\n}\n```\n\n## Thanks\n\nThanks to NativeScript team for the the plugin-seed and demo app template.\n\nThanks to Brad Martin for its implementation of [nativescript-image-filters](https://github.com/bradmartin/nativescript-image-filters).\n\n## License\n\nMost of the code comes from NativeScript team (plugin-seed and demo app) :\nApache License Version 2.0, January 2004\n\niOS implementation comes from [nativescript-image-filters](https://github.com/bradmartin/nativescript-image-filters) released by Brad Martin under MIT License.\n\nMy implementation for Android is under WTFPL.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffthuin%2Fnativescript-image-black-and-white","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffthuin%2Fnativescript-image-black-and-white","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffthuin%2Fnativescript-image-black-and-white/lists"}