Advertisement
Guest User

Untitled

a guest
Apr 19th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. if (px[0] => 0 && px[0] <= 255) {
  2.                 img1->pixels[idx] = (unsigned char)px[0];
  3.             } else if (px[0] > 255) {
  4.                     img1->pixels[idx] = 255;
  5.                 } else {
  6.                     img1->pixels[idx] = 0;
  7.                 }
  8.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement