I'm trying to copy method discribed here on stackoverflow. But I'm having some problems which I don't know how to solve. I set up jsfiddle to demonstrate everything. Here is the se Solution 1: @Loktar's great answer was made for a particular image, only composed of black and transparent pixels. In the imageData, these two type of pixels are very similar, since only their alpha value differ. So his code was only doing a should-draw check over the alpha value (the fourth in each loop).
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile