Bug with using getImageData | WordPress.org

[ad_1]

I’m creating a color picker and use the getImageData to get the color of the pixel where I click on it. It is not working when I run this code on WordPress environment. But it works when I use the exact same codes on other environment.

Try this out:

P.S.: I’m sure the script is properly enqueue. There is no conflict of plugins. No error in the console, when you click the canvas, you always get rgb(0,0,0).

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer