17 int file_flag = 0, mapflag = 0, map_num, verbose_flag = 0, i;
20 unsigned char lut_data[1536];
21 unsigned char * lutptr;
24 if (! scanargs( argc, argv,
"% f%-file!s m%-stdmap!d v%-", &file_flag,
25 &filename, &mapflag, &map_num, &verbose_flag ))
27 fprintf(stderr,
"std color maps are: 1=linear, 2=Polaroid 59,\n");
28 fprintf(stderr,
" 3=Ektachrome 100, 4=Ektachrome 100 (4K),\n");
29 fprintf(stderr,
" 5=Polaroid 59 (4K), 6=Polaroid 809 (4K)\n");
33 if (mapflag && file_flag)
35 fprintf(stderr,
"qcrldmap: only one of -f or -m\n");
39 init_qcr( verbose_flag );
43 qcr_load_i_luts( map_num );
48 if (! (mapfile = fopen( filename,
"r" )))
55 for (i = 0; i < 3*256; i++)
57 fscanf( mapfile,
"%d", &num );
58 *lutptr++ = (num >> 8) & 0xFF;
59 *lutptr++ = num & 0xFF;
61 qcr_ld_lut12( lut_data );
void main(int argc, char **argv)