Skip to content

Instantly share code, notes, and snippets.

@tianhaoz95
Created February 27, 2020 04:35
Show Gist options
  • Save tianhaoz95/4b0adb54f34a6a82a791f64920d2b98c to your computer and use it in GitHub Desktop.
Save tianhaoz95/4b0adb54f34a6a82a791f64920d2b98c to your computer and use it in GitHub Desktop.
Extract bits from pixels
Uint16List extractBitsFromImg(Uint16List img) {
Uint16List extracted = Uint16List(img.length);
for (int i = 0; i < img.length; i++) {
extracted[i] = extractLastBit(img[i]);
}
return extracted;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment