Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fixes to tiff.js to work in Chrome #10

merged 2 commits into from Nov 21, 2012


None yet
2 participants

city41 commented Nov 21, 2012

Thanks for making tiff.js, it's been a great help for a project I am working on. I had to make some minor changes to get it to work in Chrome. Chrome does not like const in strict mode (since it's not yet part of the standard), and Chrome does not support default parameters (which is a Firefox proprietary feature).

city41 added some commits Nov 21, 2012

@city41 city41 made tiff.js Chrome compatible
-- got rid of default parameters (as cool as they are)
-- got rid of const (as nice as it is)
@city41 city41 Fixed test.html to only load tiff once one is chosen 9a9291f

@GPHemsley GPHemsley added a commit that referenced this pull request Nov 21, 2012

@GPHemsley GPHemsley Merge pull request #10 from city41/master
Fixes to tiff.js to work in Chrome

@GPHemsley GPHemsley merged commit 240644a into GPHemsley:master Nov 21, 2012


GPHemsley commented Nov 21, 2012

Great, thanks!


GPHemsley commented Nov 21, 2012

I've pretty much undone commit 9a9291f with commit 9d6e3c5.

I generally test the script with by refreshing with a file already loaded, so having the onload trigger would prompt the image to be reparsed on refresh, instead of me having to manually reload the image.

I also changed the default background color to something that is a little more obvious (#FFEEFF). Having it solid black could lead to confusion as whether an image was parsed correctly, if an image actually has a lot of black in it. Along those lines, I've also (in commit f1ad327) made it so that the canvas border changes from dashed to solid when the image is loaded.

Hopefully these changes will satisfy the same usecase requirements as your original commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment