{"id":15304598,"url":"https://github.com/monkeymars/ng-image-compress","last_synced_at":"2025-10-08T09:30:51.562Z","repository":{"id":149889739,"uuid":"47553500","full_name":"monkeymars/ng-image-compress","owner":"monkeymars","description":"compress jpeg or png files using angularjs on client side - using HTML5 Canvas \u0026 File API (based off of a J-I-C project on github).","archived":false,"fork":true,"pushed_at":"2015-01-06T22:24:14.000Z","size":272,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-02T07:57:05.504Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"sammychl/ng-image-compress","license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monkeymars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-12-07T13:24:46.000Z","updated_at":"2015-12-07T13:24:47.000Z","dependencies_parsed_at":"2023-04-02T10:57:53.333Z","dependency_job_id":null,"html_url":"https://github.com/monkeymars/ng-image-compress","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fng-image-compress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fng-image-compress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fng-image-compress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monkeymars%2Fng-image-compress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monkeymars","download_url":"https://codeload.github.com/monkeymars/ng-image-compress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235700110,"owners_count":19031668,"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-10-01T07:57:11.003Z","updated_at":"2025-10-08T09:30:51.270Z","avatar_url":"https://github.com/monkeymars.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"ng-image-compress\n=================\n\n######This Angular directive compresses jpeg or png files using angularjs on client side. It uses using HTML5 Canvas \u0026amp; File API. The compression algorithm is based off of the J-I-C project on github. \n###### There's an old angularjs-imageupload-directive from mischi package that claims to do image compress, but somehow it doesn't compress images nearly as well as the J-I-C project's. Thus, this repo here. Some of the code was borrowed from the above too, so u will find similarities. Note: I have absolutely no clue why J-I-C's compression is better.\n-----------\n\nSteps:\n\n  1. bower install ng-image-compress then add ng-image-compress.js directive as a dependency in your index.html\n  2. add image tag to ur html \u003cinput\u003e element. eg. image=\"myAwesomeImage\"\n  3. add \u003cimg ng-src=\"{{myAwesomeImage.compressed.dataURL}}\"\u003e to ur html page to see the compressed photo.\n  4. do whatever u want to do with the compressed file. eg. use angular-file-upload package to upload it.\n  \nExample:\n\n`\u003cinput id=\"inputImage\" type=\"file\" accept=\"image/*\" image=\"image1\" resize-max-height=\"1000\" resize-max-width=\"1000\" resize-quality=\"0.7\" resize-type=\"image/jpg\" /\u003e`\n\n**Adjustable: resize-max-height, resize-max-width, resize-quality, resize-type \n\n\nFor demo, u can just clone this repo and then run index.html. thanks!!","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeymars%2Fng-image-compress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonkeymars%2Fng-image-compress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonkeymars%2Fng-image-compress/lists"}