Advertisement
Guest User

Untitled

a guest
Nov 21st, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. for (int i = 0; i < PictureInfo->biHeight; i++) {
  2. unsigned tmpVal = 0;
  3. for (int j = 0; j < PictureInfo->biWidth; j++) {
  4. pixMap[i][j] = 0;
  5.  
  6. iStream.read(helpVar, 3 * sizeof(char)); //B
  7. tmpVal = (unsigned char)helpVar[0];
  8. //average += tmpVal;
  9. tmpVal = tmpVal << 16;
  10. pixMap[i][j] += tmpVal;
  11. tmpVal = (unsigned char)helpVar[1]; //G
  12. tmpVal = tmpVal << 8;
  13. pixMap[i][j] += tmpVal;
  14. tmpVal = (unsigned char)helpVar[2]; //R
  15. pixMap[i][j] += tmpVal;
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement