Skip to content

Instantly share code, notes, and snippets.

@dennda
Created October 5, 2011 18:15
Show Gist options
  • Save dennda/1265212 to your computer and use it in GitHub Desktop.
Save dennda/1265212 to your computer and use it in GitHub Desktop.
uint16* dest = (uint16*) malloc(width * height * 4 * sizeof(uint16));
short* subscript = (short*) imgData;
for (unsigned long long i = 0; i < width * height; ++i) {
uint16 x = subscript[i] + 1000;
dest[i*4] = x;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment