Advertisement
Guest User

Untitled

a guest
Dec 18th, 2018
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1.   dataR = (unsigned char**)malloc(H);
  2.  
  3.   if(number_of_bytes = 3) {
  4.     dataG = (unsigned char**)malloc(H);
  5.     dataB = (unsigned char**)malloc(H);
  6.   }
  7.  
  8.   for(int i = 0; i < H; ++i) {
  9.       dataR[i] = (unsigned char*)malloc(W);
  10.       if(number_of_bytes = 3) {
  11.         dataG[i] = (unsigned char*)malloc(W);
  12.         dataB[i] = (unsigned char*)malloc(W);
  13.       }
  14.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement