libtiffjs
v0.1.13
Published
[![Build Status](https://travis-ci.org/aviklai/libtiffjs.svg?branch=master)](https://travis-ci.org/aviklai/libtiffjs) [![Coverage Status](https://coveralls.io/repos/github/aviklai/libtiffjs/badge.svg?branch=master)](https://coveralls.io/github/aviklai/li
Downloads
13
Maintainers
Readme
libtiffjs
Reading tiff using libtiff, compiled to webassembly. Inspired by loam (Worker and wasm communication architecture) - https://github.com/azavea/loam Using libtiff wasm - https://github.com/Twinklebear/tiff.js
Installation instructions - webpack
- Run
npm install --save libtiffjs
- Install file-loader:
npm install --save-dev file-loader
- Add the following alias to webpack config file:
libtiffjs: path.join(__dirname, 'node_modules', 'libtiffjs', 'lib')
- Load libtiffjs files using file-loader (add to webpack config):
{
test: /(libtiff-worker\.js|tiff\.raw\.wasm|tiff\.raw\.js)$/,
type: 'javascript/auto',
loader: 'file-loader?name=[name].[ext]',
}
- To load the library in your code:
import * as libtiffjs from 'libtiffjs';
require('libtiffjs/libtiff-worker.js');
require('libtiffjs/tiff.raw.js');
require('libtiffjs/tiff.raw.wasm');
libtiffjs.initialize();
Demo
https://libtiffjs.netlify.app The demo code is available here: https://github.com/aviklai/libtiffjs-example