Developers wanting to look at details for small images on high-resolution screens may prefer a higher zoom range. This PR adds support for an 800% zoom and also adds a toggle to the image editor to disable (or enable) zoom smoothing.
By default, browsers that use a canvas scale option (as is used by this editor for zoom) will apply a bicubic interpolation to an image, which isn't necessarily the most accurate representation of the image. Using an annoying number of CSS properties we can disable this default behavior in browsers.
Tested and functional in Chrome 46 (should work in 41+), Safari 9 (should work in 6.1+), Firefox 42 (should work with 6+).
Should also work with IE 11, but the scale transform doesn't seem to apply, so no zoom happens in that browser. MS Edge does not support interpolation options other than their default at all.
Developers wanting to look at details for small images on high-resolution screens may prefer a higher zoom range. This PR adds support for an 800% zoom and also adds a toggle to the image editor to disable (or enable) zoom smoothing.
By default, browsers that use a canvas scale option (as is used by this editor for zoom) will apply a bicubic interpolation to an image, which isn't necessarily the most accurate representation of the image. Using an annoying number of CSS properties we can disable this default behavior in browsers.
Tested and functional in Chrome 46 (should work in 41+), Safari 9 (should work in 6.1+), Firefox 42 (should work with 6+).
Should also work with IE 11, but the scale transform doesn't seem to apply, so no zoom happens in that browser. MS Edge does not support interpolation options other than their default at all.
More complete list of compatibility available here, with some motivation for the mechanism provided by this Stack Overflow post.