6 ms·
The very interesting thing is that it goes through transparent portions of png backgrounds. Try it in the google logo. I am very impressed.
by program 12y ago
The very interesting thing is that it goes through transparent portions of png backgrounds. Try it in the google logo.
I am very impressed.
- solutionyogi 12y agoWhat? I could not believe what you wrote but you are right, it does go through transparent background. http://i.imgur.com/byfmzAJ.png http://i.imgur.com/byfmzAJ.png How did he make it work? I didn't think this would be possible. Yes, extremely impressed with the tool. EDIT: Looked at the code. He takes screenshot of the active tab when extension is clicked. And then parses the PNG in measureDistances function when mouse moves. https://github.com/mrflix/dimensions/blob/master/extension/dimensions.js#L98 https://github.com/mrflix/dimensions/blob/master/extension/d... For a mouse at position X, Y, it tries to find the farthest Top, Bottom, Right, Left points with same color/threshold. This is why it is able to see through 'transparent' Google logo. https://github.com/mrflix/dimensions/blob/master/js/worker.js#L94 https://github.com/mrflix/dimensions/blob/master/js/worker.j... Great work.