Uses web workers with transferable objects. Also single core version is supported.
Install with NPM:
npm install https://github.com/viliusle/Hermite-resize.git
Usage with NPM:
import Hermite_class from 'hermite-resize'; var HERMITE = new Hermite_class();
<script src="../dist/hermite.js"></script> <script> var HERMITE = new Hermite_class(); //default resize HERMITE.resample(canvas, width, height); //more options HERMITE.resample(canvas, width, height, true, finish_handler); //true=resize canvas //single core HERMITE.resample_single(canvas, width, height); //resize image to 300x100 HERMITE.resize_image('image_id', 300, 100); //resize image to 50% HERMITE.resize_image('image_id', null, null, 50); </script>
- demo file included:
- single core demo - http://jsfiddle.net/9g9Nv/460/
Single core version - stable. Multi core version - experimental.
- git clone https://github.com/viliusle/Hermite-resize.git
- cd [hermite-resize directory]
- edit files...
- npm install (build for production)