eduardolundgren / tracking.js

A modern approach for Computer Vision on the web
http://trackingjs.com
Other
9.44k stars 1.45k forks source link

tracking.trackImg_: using naturalWidth, naturalHeight #319

Closed cesarpachon closed 6 years ago

cesarpachon commented 6 years ago

using width, height to obtain the dimensions of a image will return the css scaled dimensions, not the real dimensions of the image. by using naturalWidth, naturalHeight instead, the canvas will be created with the same pixel dimensions that the original image, not the incorrect scaled size given to the image by the css rules.

eduardolundgren commented 6 years ago

nice catch, thank you