selective recolor an image

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mark

    selective recolor an image

    how might one recolor an image..so that, for example, all shades of
    purple are converted to shades of red?

    i'm sure someone's already made a function out there, i just don't have
    a clue what to google.

    if someone could point me in the right direction, or post some code, it
    would be much appreciated.

  • petersprc@gmail.com

    #2
    Re: selective recolor an image

    You can use imagecolorset. There's an an example in the comment from
    olivier in the manual page:



    Another way is to copy the image pixel by pixel. Example:

    How to use GD lib to adjust brightness, contrast, gamma, to create a negative, noisy or grayscale image. And some more... The code provided in the posting is easy to extend with your own experiments.


    Mark wrote:
    how might one recolor an image..so that, for example, all shades of
    purple are converted to shades of red?
    >
    i'm sure someone's already made a function out there, i just don't have
    a clue what to google.
    >
    if someone could point me in the right direction, or post some code, it
    would be much appreciated.

    Comment

    Working...