RE: adding noise to an image



> 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);
> 

Gawd, how embarrising ...

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


Awoooo! Howling!



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