Skip to content

Instantly share code, notes, and snippets.

@dennda
Created September 19, 2011 22:23
Show Gist options
  • Save dennda/1227773 to your computer and use it in GitHub Desktop.
Save dennda/1227773 to your computer and use it in GitHub Desktop.
uint16_t pix = 0;
uint16_t min = 34464;
uint16_t max = 0;
uint16_t *d = (uint16_t*) imgData;
for (int i = 0; i < 512 * 512; i++) {
pix = d[i];
if (pix > max)
max = pix;
else if (pix < min)
min = pix;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment