Possible to change an image color palette using javascript? -


i've seen questions here none of them provide answer.

what need javascript (or perhaps kind of plugin using php/apache) can find colors in image , replace them closest color custom palette, in case nes palette. how can done?

yes, can done using javascript, following these steps :

  1. load image canvas
  2. get imagedata (which array of rgba values each pixel)
  3. loop through array , convert rgba values hex values
  4. convert resulting color nearest color in pallette
  5. convert new colors rgba values
  6. restore new imagedata array canvas

Comments

Popular posts from this blog

java - Play! framework 2.0: How to display multiple image? -

gmail - Is there any documentation for read-only access to the Google Contacts API? -

php - Controller/JToolBar not working in Joomla 2.5 -