https://github.com/thadeu/resize-image-to-fit
Redimensionamento de Imagens com Javascript no Client
https://github.com/thadeu/resize-image-to-fit
cave resize-image resize-images-javascripts
Last synced: about 1 year ago
JSON representation
Redimensionamento de Imagens com Javascript no Client
- Host: GitHub
- URL: https://github.com/thadeu/resize-image-to-fit
- Owner: thadeu
- License: mit
- Created: 2017-11-06T21:24:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-03-27T22:16:09.000Z (about 8 years ago)
- Last Synced: 2025-02-12T07:54:30.922Z (over 1 year ago)
- Topics: cave, resize-image, resize-images-javascripts
- Language: CSS
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Resize ImageToFit with Javascript
Para testar, abra o arquivo index.html, selecione as imagens e aguarde o redimensionamento. Pode ser usado em várias imagens.
```bash
yarn add resize-image-canvas@latest
```
or
```bash
npm install resize-image-canvas@latest
```
# How to use
```html
Selecione os arquivos
Iniciar
```
```javascript
window.onload = function(){
/**
* Evento de Click
*/
document.querySelector('.resize-action').addEventListener('click', function(e){
e.preventDefault();
// using Array fro files
new FileResize({
boxPreview: document.querySelector('.previews'),
files: document.querySelector('.input-files').files,
width: 200,
height: 200,
loading: 'carregando...' // (opcional)
})
})
}
```
# Exemplo

Library [Resize Image Canvas](https://github.com/thadeu/resize-image-canvas)
# Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/Thadeu/resize-image-to-fit