views:

64

answers:

1

Hi wanted to get the list of pixel color values(RBG) from an image using Javascript so that i can get interesting colors from an image .can anyone help me on this issue please...

thanks in advance

A: 

try to create canvas element, draw image on i and then use array of pixeldata from it:

data = canvas.getImageData(x, y, 1, 1).data;

it gives you array with RGBA colors

MichalBE