javascript - How to load TIFF image with fabric.js? -


from can tell, fabric.js can load either jpg or png files. fails when try load tiff file. idea?

fabric.image.fromurl('my_image.tif', function(oimg) {   canvas.add(oimg); }); 

this not problem fabricjs, more browsers in general not support tiff file format. ie , safari being exceptions less mainstream browsers.

workarounds

however, possible read , parse tiff files manually. read tiff can use example tiff-js. may able plugins browser can decode tiffs (the latter possibly require end-user install plugin well).

though, recommend convert tiff example png general use.

similarly, not able save out tiff either same reasons above, feel free @ canvas-to-tiff solution (free).


Comments

Popular posts from this blog

symfony - TEST environment only: The database schema is not in sync with the current mapping file -

twig - Using Twigbridge in a Laravel 5.1 Package -

jdbc - Not able to establish database connection in eclipse -