added basic pixel ratio detection