@ns0m/hermite-resize

2.2.10 • Public • Published

Publication-only version of the viliusle/Hermite-resize package. Latest Published Version

npm install @ns0m/hermite-resize

Hermite-resize

Fast canvas image resize/resample using Hermite filter with JavaScript. Supports transparency, gives good quality. Library was created for canvas manipulation, but it also can resize HTML images.

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();

Usage:

<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>

Version 1.0

Single core version - stable. Multi core version - experimental.

Build instructions

Readme

Keywords

Package Sidebar

Install

npm i @ns0m/hermite-resize

Weekly Downloads

16

Version

2.2.10

License

MIT

Unpacked Size

259 kB

Total Files

10

Last publish

Collaborators

  • ath0mas