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

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -