Advertisement
Guest User

Untitled

a guest
Nov 24th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.50 KB | None | 0 0
  1.       //Compile each line of the image and write the image line-by-line
  2.       for( int y = 0; y < IMHT; y++ ) {
  3.         for( int x = 0; x < (IMWD/8); x++ ) {
  4.           uchar packedLine = 0;
  5.           c_in :> packedLine;
  6.           for(int i = 0; i < 8; i++) {
  7.               line[x + i] = (uchar) ((packedLine >> (7-i)) & 1) * 255;
  8.           }
  9.           //Lights the Blue LED
  10.           led <: 1;
  11.         }
  12.         _writeoutline( line, IMWD );
  13.         printf( "DataOutStream: Line written...\n" );
  14.       }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement