Skip to content

Instantly share code, notes, and snippets.

@sadimanna
Created September 10, 2020 14:24
Show Gist options
  • Select an option

  • Save sadimanna/988c84cb6c0db40842a02e98484ec1d0 to your computer and use it in GitHub Desktop.

Select an option

Save sadimanna/988c84cb6c0db40842a02e98484ec1d0 to your computer and use it in GitHub Desktop.
nBytesTotal = nImg*nR*nC*1 #since each pixel data is 1 byte
images_array = np.asarray(st.unpack('>'+'B'*nBytesTotal,imagesfile.read(nBytesTotal))).reshape((nImg,nR,nC))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment