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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

How to connect android app to App engine -

hadoop - Running Map Reduce Job shows error - Mkdirs failed to create /var/folders/ -