deathcap / inventory-window

GUI windows for interactively manipulating an inventory
http://deathcap.github.io/inventory-window/
7 stars 2 forks source link

image-rendering: pixelated for Chrome 41 #25

Open deathcap opened 9 years ago

deathcap commented 9 years ago

Chrome 41+ now finally supports image-rendering: pixelated:

https://www.chromestatus.com/feature/5118058116939776

Should use it instead of the manual canvas rescaling where possible

deathcap commented 9 years ago

Chrome also supports image-rendering: -webkit-optimize-contrast, enabled:

screen shot 2015-02-08 at 12 17 43 pm

disabled:

screen shot 2015-02-08 at 12 17 51 pm

then there's image-rendering: crisp-edges.. difference vs pixelated? http://stackoverflow.com/questions/20678639/image-rendering-crisp-edges-vs-pixelated

According to the spec, it seems that crisp-edge allows for smooth pixel-art scaling algorithms like 2xSaI and HQ2X; whereas pixelated only allows common nearest-neighbour scaling.

inventory-window is already using crisp-edges so if Chrome 41+ supports it no changes may be needed (unless guaranteed nearest-neighrbor pixelation is desired, vs the possibility of smooth scaling? unsure, but leaning towards pixelated); however, at the time of this writing Chrome stable is version 40, to revisit after 41 is out of beta