Skip to content

Instantly share code, notes, and snippets.

@uploadcare-user
Created September 14, 2017 17:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save uploadcare-user/ceba80a1584d057316bff6b9edf5412a to your computer and use it in GitHub Desktop.
Save uploadcare-user/ceba80a1584d057316bff6b9edf5412a to your computer and use it in GitHub Desktop.
Construction we find in the code, limiting output pixel values
if (ss < 0.5)
imOut->image[yy][xx*4+b] = (UINT8) 0;
else if (ss >= 255.0)
imOut->image[yy][xx*4+b] = (UINT8) 255;
else
imOut->image[yy][xx*4+b] = (UINT8) ss;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment