RE: adding noise to an image



> most go over the entire thing. Randomly, some pixels will be altered,
> others won't. The noise is uniform random between [0,255] 
> (not just black

Don't you just set rgb to the same value for grey scale?

  uint8 * p_buf = get_buf_blah_pseudo();
  uint8 by_val = rand()%std::numeric_limits<uint8>::max_val;
  std::fill(by_val, by_val + 3, by_val);


Not sure about Gdk::Colours.

Cheers,

Gaz



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]