• Stars
    star
    377
  • Rank 113,535 (Top 3 %)
  • Language
    JavaScript
  • License
    Other
  • Created about 12 years ago
  • Updated over 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Javascript Canvas Resize Plugin. It can work both with jQuery and Zepto. It's compatible with iOS6 and Android 2.3+

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 And fixed orientation issue by using exif-js

You can change image size and quality with plugin options easily.

Tested on:

  • Chromium (24.0.1312.56)
  • Google Chrome (25.0.1364.68 beta)
  • Opera (12.14)
  • IOS 6.1.2

You can check it on 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 and It requires binaryajax.js and exif.js (or jQuery EXIF) to work which is also under the MPL License

Developer

goker

More Repositories

1

droparea

droparea is a HTML5 drag and drop image/file uploader jQuery plugin
JavaScript
186
star
2

f4player

f4Player :: Open Source AS3 Flash Video Player
ActionScript
116
star
3

loopback-react

loopback - react, router, redux, axios, formik, bootstrap 4 fullstack playground with authentication and user management
JavaScript
26
star
4

flipclock

flip clock jQuery plugin with CSS3 animations for modern browsers
JavaScript
22
star
5

donateme

It is a simple donation collection project by PayPal.
CSS
10
star
6

geticon

stop the social icons mania use the original !!! / use website's favicon as a social icon.
PHP
9
star
7

contextmenu

contextmenu is a context menu (right click menu) jQuery plug-in.
JavaScript
7
star
8

ubox

ubox is an overlay image viewer (It's a kind of lightbox) jQuery plug-in
JavaScript
3
star
9

holder

This is an open source server side image holder web service.
HTML
3
star
10

celebritymeter

Celebrity Meter
PHP
3
star
11

gobot

JavaScript Canvas Monte Carlo Localization Simulator
JavaScript
2
star
12

carousel

carousel is a carousel jQuery plug-in.
JavaScript
2
star
13

forma

forma is a form customization jQuery plugin.
JavaScript
2
star
14

player

player is an audio and video player jQuery plug-in.
JavaScript
2
star
15

blackboard

blackboard is an application for Google Chrome or Chromium. It is for writing or drawing while recording tutorials instead of talking.
JavaScript
2
star
16

kodkafa-app-template

This template provides a setup to get React working in Vite with HMR and KODKAFA ESLint rules.
TypeScript
1
star
17

slidezone

slidezone is a slider with customizable effects, jQuery plug-in
JavaScript
1
star