Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goker-dev/canvasResize
Javascript Canvas Resize Plugin. It can work both with jQuery and Zepto. It's compatible with iOS6 and Android 2.3+
https://github.com/goker-dev/canvasResize
Last synced: 3 months ago
JSON representation
Javascript Canvas Resize Plugin. It can work both with jQuery and Zepto. It's compatible with iOS6 and Android 2.3+
- Host: GitHub
- URL: https://github.com/goker-dev/canvasResize
- Owner: goker-dev
- License: other
- Created: 2012-10-22T16:26:06.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2020-05-28T17:21:34.000Z (over 4 years ago)
- Last Synced: 2024-06-22T22:02:53.500Z (6 months ago)
- Language: JavaScript
- Homepage: http://gokercebeci.com/dev/canvasresize
- Size: 86.9 KB
- Stars: 377
- Watchers: 22
- Forks: 89
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
canvasResize
=============**canvasResize** is a plug-in for client side image resizing. It's compatible with **iOS6**.
It can work both with **jQuery** and **Zepto**
I fixed iOS6 Safari's image file rendering issue for large size image (over mega-pixel) using few functions from
[**ios-imagefile-megapixel**](https://github.com/stomita/ios-imagefile-megapixel)
And fixed *orientation* issue by using
[**exif-js**](https://github.com/jseidelin/exif-js)
You can change image size and quality with plugin [**options**](#options) easily.### Tested on:
* Chromium (24.0.1312.56)
* Google Chrome (25.0.1364.68 beta)
* Opera (12.14)
* IOS 6.1.2You can check it on [gokercebeci.com/dev/canvasresize](http://gokercebeci.com/dev/canvasresize).
Usage
-----$('input[name=photo]').change(function(e) {
var file = e.target.files[0];
canvasResize(file, {
width: 300,
height: 0,
crop: false,
quality: 80,
//rotate: 90,
callback: function(data, width, height) {
$(img).attr('src', data);
}
});
});Options
-------width : 300, // Image width.
height : 0, // Image height, default 0 (flexible).
crop : false, // default false.
quality : 80, // Image quality default 80.
rotate : 90, // Image rotation default 0
callback : function(){},License
-------
It is under [MIT License](https://github.com/gokercebeci/canvasResize/blob/master/LICENCE.md "MIT License")
and It requires **binaryajax.js** and **exif.js** (or **jQuery EXIF**)
to work which is also under the [MPL License](http://www.nihilogic.dk/licenses/mpl-license.txt)Developer
---------
[goker](http://gokercebeci.com/ "goker")