{"id":15283976,"url":"https://github.com/adfinis/ember-filter-image","last_synced_at":"2025-10-07T00:31:42.727Z","repository":{"id":57223760,"uuid":"70149488","full_name":"adfinis/ember-filter-image","owner":"adfinis","description":"ember-cli addon for cross-browser image filtering","archived":true,"fork":false,"pushed_at":"2017-02-24T16:17:00.000Z","size":624,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-05-21T01:49:51.500Z","etag":null,"topics":["addon","ember","image-filtering"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/adfinis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-06T11:55:22.000Z","updated_at":"2024-02-10T18:29:10.000Z","dependencies_parsed_at":"2022-08-30T02:40:29.792Z","dependency_job_id":null,"html_url":"https://github.com/adfinis/ember-filter-image","commit_stats":null,"previous_names":["adfinis-sygroup/ember-filter-image"],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fember-filter-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fember-filter-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fember-filter-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adfinis%2Fember-filter-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adfinis","download_url":"https://codeload.github.com/adfinis/ember-filter-image/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219877441,"owners_count":16554878,"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":["addon","ember","image-filtering"],"created_at":"2024-09-30T14:48:30.172Z","updated_at":"2025-10-07T00:31:37.182Z","avatar_url":"https://github.com/adfinis.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![npm version](https://badge.fury.io/js/ember-filter-image.svg)](https://badge.fury.io/js/ember-filter-image)\n[![Ember Observer Score](http://emberobserver.com/badges/ember-filter-image.svg)](http://emberobserver.com/addons/ember-filter-image)\n[![Build Status](https://travis-ci.org/adfinis-sygroup/ember-filter-image.svg?branch=master)](https://travis-ci.org/adfinis-sygroup/ember-filter-image)\n\n# ember-filter-image\n\nAn [ember-cli](http://www.ember-cli.com) addon for cross-browser image filtering using SVG filters.\n\nJust [take me to the demo!](https://adfinis-sygroup.github.io/ember-filter-image/)\n\n## Usage\n\nJust add the `filter-image` component to your template:\n```\n{{filter-image src=\"image.jpg\" filters=filters}}\n```\n`src` should be pretty self-explanatory, and `filters` is an object containing the filter settings, e.g. (in your route):\n```javascript\nsetupController(controller) {\n  controller.set('filters', {\n    contrast: 1,\n    saturation: 1,\n    brightness: 0\n  })\n}\n```\n\n### Scaling\nBy default, the rendered image will be scaled such that it is contained in the parent DOM element. If you'd prefer it to be cropped apply this:\n```\n{{filter-image src=\"image.jpg\" filters=filters crop=true}}\n```\nIf you don't want the aspect ratio to be locked, apply this:\n```\n{{filter-image src=\"image.jpg\" filters=filters lockAspectRatio=false}}\n```\n### Options\n| Name | Type | Default | Description |\n| ---- | ---- | ------- | ----------- |\n| src | `String` | N/A | The source of the image |\n| filters | `Object` | `{ saturation: 1, contrast: 1, brightness: 0 }` | The values for the filters to apply |\n| crop    | `Boolean` | `false` | Whether to crop the image on scaling (this is obviously ignored if the aspect ratio is not locked) |\n| lockAspectRatio | `Boolean` | `true` | Whether to lock the aspect ratio on scaling |\n\n## Why not use CSS filters?\n\nBecause [IE11 doesn't support them...](http://caniuse.com/#feat=css-filters)\n\n## Supported filters\n* [contrast](https://developer.mozilla.org/en/docs/Web/CSS/filter#contrast(amount))\n* [saturation](https://developer.mozilla.org/en/docs/Web/CSS/filter#saturate(amount))\n* [brightness](https://developer.mozilla.org/en/docs/Web/CSS/filter#brightness(amount))\n\nAdding more filters just a matter of implementing the respective filter function, though.\n\n## Installation\n\n* `git clone \u003crepository-url\u003e` this repository\n* `cd ember-filter-image`\n* `npm install`\n* `bower install`\n\n## Running\n\n* `ember serve`\n* Visit your app at [http://localhost:4200](http://localhost:4200).\n\n## Running Tests\n\n* `npm test` (Runs `ember try:each` to test your addon against multiple Ember versions)\n* `ember test`\n* `ember test --server`\n\n## Building\n\n* `ember build`\n\nFor more information on using ember-cli, visit [http://ember-cli.com/](http://ember-cli.com/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadfinis%2Fember-filter-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadfinis%2Fember-filter-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadfinis%2Fember-filter-image/lists"}