I actually did change it to this...
Can someone try this and see if they are getting the correct values?Code:const unsigned int bit[] = {0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80}; int binValue = 0; int count = 0; int j = 0; for(int k=0; k < imageLength; k++) { for(int i=0; i < imageWidth; i++) { if(j > 7) j = 0; binValue = (buf[i] & bit[j]) >> j; cout << binValue; j++; } cout << endl; }
The next step (if this works) is to get the output to reverse what it is right now... any suggestions on the fastest way to do that?



LinkBack URL
About LinkBacks


