Detect Pixel Color Of Image

Does anyone know of a lightweight module (nodejs or JavaScript) that will detect a pixels color for example the top left pixel of an image?

I am essentially looking to detect if an uploaded image has a transparent background or not.

What about this:

You may need to play with it outside Wappler to speed up learning

A matrix is an array of arrays - a bi-dimensional array

image[0][0] gets you the RGBA values of pixel (0, 0)

I believe you check the A value for transparency

1 Like