Advertisement
Guest User

a.c

a guest
Sep 6th, 2014
284
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. //to compile with mingw: gcc a.c -mconsole -mwindows
  2. #include <stdio.h>
  3. #include <windows.h>
  4.  
  5. int main(void)
  6. {
  7.     WORD vals[3][256];
  8.    
  9.     int i, j;
  10.     for (i = 0; i < 3; i++) for (j = 0; j < 256; j++) vals[i][j] = 0;
  11.  
  12.     HDC hdc = GetDC(NULL);
  13.    
  14.     if (GetDeviceGammaRamp(hdc, &vals) == 0) {
  15.         printf("fail!\n");
  16.         return 1;
  17.     }
  18.  
  19.     for (i = 0; i < 256; i++)
  20.         printf("%u\t%u\t%u\n", vals[0][i],vals[1][i],vals[2][i]);
  21.    
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement