Image pixel color picker with jQuery

10,077

Solution 1

This would help you mate - http://www.project-sierra.de/ImageColorPicker/example/

Good luck!

Solution 2

You can draw an img image into a canvas element, and than use it's canvas.getContext("2d").getImageData to get the pixel's information

Share:
10,077
onetdev
Author by

onetdev

Updated on June 25, 2022

Comments

  • onetdev
    onetdev almost 2 years

    First of all this is not a simple "color picker". So there's a picture (size and content does not matter) and i want to pick the color of some pixels (and then use these color to generate a HTML or Canvas based halftone "image").

    how it work

    For example: There is a 240x240 image. I want to pick the color of the following coordinates: x80y80, x80y160, x160y80, x160y160. How can i get them with jQuery/javascript (excluding jQuery UI)? Is it necessary to use canvas element?

    I would appreciate if somebody could help me on this mission.