Utah Raster Toolkit  9999-git
URT Development version (post-3.1b)
bright.c
Go to the documentation of this file.
1 /*
2  * Print all sorts of QCR status. "-l" lists the color tables.
3  */
4 
5 #include <stdio.h>
6 char *lables[4] = { "Red", "Green", "Blue", "Neutral" };
8 int argc;
9 char **argv;
10 {
11  unsigned char buf[BUFSIZ];
12  short lut[3][256];
13  int i;
14  int print_luts = (strcmp(argv[1],"-l") == 0);
15 
16  init_qcr( 1 );
17 
18  printf("\n");
19  print_qcr_status();
20  printf("\n");
21 
22 /* qcr_load_i_luts( 2 ); */
23 
24  qcr_rd_brt_tbl( buf );
25  for ( i = 1; i <= buf[0]; i++ )
26  printf( "Bright %d: %3d\n", i - 1, buf[i] );
27 
28  qcr_rd_brt_lvl( buf );
29  for ( i = 0; i < 4; i++ )
30  printf( "%s bright: %d\n", lables[i], buf[i] );
31 
32  if (print_luts)
33  {
34  qcr_rd_lut12( lut );
35  for ( i = 0; i < 256; i++ )
36  {
37  printf( "%3d:\t%3d %3d %3d", i, lut[0][i], lut[1][i], lut[2][i] );
38  if ( i != 0 )
39  printf( "\t%4d %4d %4d", lut[0][i] / i,
40  lut[1][i] / i, lut[2][i] / i );
41  printf( "\n" );
42  }
43  }
44 }
void main(int argc, char **argv)
Definition: aliastorle.c:121
char * lables[4]
Definition: bright.c:6