{"id":15471880,"url":"https://github.com/thadeu/resize-image-canvas","last_synced_at":"2025-04-06T01:42:31.830Z","repository":{"id":57354627,"uuid":"109772812","full_name":"thadeu/resize-image-canvas","owner":"thadeu","description":"Library from resize images using canvas JavaScript","archived":false,"fork":false,"pushed_at":"2018-03-27T22:14:59.000Z","size":205,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T12:01:42.629Z","etag":null,"topics":[],"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/thadeu.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":"2017-11-07T01:51:26.000Z","updated_at":"2018-03-27T22:15:01.000Z","dependencies_parsed_at":"2022-09-12T03:40:15.365Z","dependency_job_id":null,"html_url":"https://github.com/thadeu/resize-image-canvas","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/thadeu%2Fresize-image-canvas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Fresize-image-canvas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Fresize-image-canvas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thadeu%2Fresize-image-canvas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thadeu","download_url":"https://codeload.github.com/thadeu/resize-image-canvas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247423494,"owners_count":20936622,"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-02T02:22:07.048Z","updated_at":"2025-04-06T01:42:31.808Z","avatar_url":"https://github.com/thadeu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Resize Image to Canvas\n\n# How to install lib\n\n```bash\nyarn add resize-image-canvas@latest\n```\n\nor \n\n```bash\nnpm install resize-image-canvas@latest\n```\n\n# Using ES5/ES6,ES7,ES*\n\n```javascript\nimport FileResize from 'resize-image-canvas'\n\ndocument.querySelector('.resize-action').addEventListener('click', function(e){\n    e.preventDefault();\n    \n    // using Array fro files\n    new FileResize({\n      boxPreview: document.querySelector('.previews'), \n      files: document.querySelector('.input-files').files, \n      width: 200, \n      height: 200,\n      loading: 'carregando...', // (opcional)\n      callback: function(){\n      }\n    })\n  })\n}\n```\n\n# Using VanilhaJS or jQuery\n\nGet to files with clone repo https://github.com/Thadeu/resize-image-canvas\nAfter load file resize-image-canvas in your assets project path, so!\n\n```html\n\u003cscript src=\"resize-image-canvas.min.js\"\u003e\u003c/script\u003e \n```\n\n### After use lib\n\n```html\n\u003cform method=\"post\" class='form'\u003e\n  \u003cdiv class=\"field\"\u003e\n    \u003cinput type=\"file\" name=\"file[]\" id=\"file\" class=\"input-files\" multiple\u003e \n    \u003clabel for=\"file\"\u003eSelecione os arquivos\u003c/label\u003e\n  \u003c/div\u003e \u003cbr\u003e\n\n  \u003cdiv class=\"field\"\u003e\n    \u003cbutton type=\"submit\" class=\"resize-action btn btn-primary\"\u003eIniciar\u003c/button\u003e\n  \u003c/div\u003e\n\n  \u003cdiv class=\"previews\"\u003e\u003c/div\u003e\n\u003c/form\u003e\n```\n\n```javascript\n$('.resize-action').on('click', function(e){\n    e.preventDefault();\n    \n    // using Array fro files\n    new FileResize({\n      boxPreview: $('.previews'), \n      files: $('.input-files').files, \n      width: 200, \n      height: 200,\n      loading: 'carregando...', // (opcional)\n      callback: function(){\n      }\n    })\n  })\n}\n```\n\n# Exemplo\n\nSee you exemple here! [Exemple Project using VanilhaJS](https://github.com/Thadeu/resize-image-to-fit)\n\n![captura de tela 2017-11-06 as 18 34 34](https://user-images.githubusercontent.com/77889/32465128-2be43768-c321-11e7-9cd0-5ec4abedc8a2.png)\n\n# Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/Thadeu/resize-image-canvas\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Fresize-image-canvas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthadeu%2Fresize-image-canvas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthadeu%2Fresize-image-canvas/lists"}