コード例 #1
0
ファイル: gbmhdr.c プロジェクト: ErisBlastar/osfree
static void usage(void)
{
    int ft, n_ft;

    fprintf(stderr, "usage: %s [-g] [-s] [--] {\"\\\"fn.ext\\\"{,opt}\"} ...\n", progname);
    fprintf(stderr, "       -g           don't guess bitmap format, try each type\n");
    fprintf(stderr, "       -s           be silent about errors\n");
    if (SupportsNumberOfPagesQuery())
    {
      fprintf(stderr, "       -c           show all contained bitmaps of multipage images\n");
      fprintf(stderr, "                    (this option discards all user options except ext_bpp)\n");
    }
    fprintf(stderr, "       fn.ext{,opt} input filenames (with any format specific options)\n");
    gbm_init();
    gbm_query_n_filetypes(&n_ft);
    for ( ft = 0; ft < n_ft; ft++ )
    {
        GBMFT gbmft;

        gbm_query_filetype(ft, &gbmft);
        fprintf(stderr, "                    %s when ext in [%s]\n",
                gbmft.short_name, gbmft.extensions);
    }
    gbm_deinit();

    fprintf(stderr, "        opt         bitmap format specific option to pass to bitmap reader\n");

    fprintf(stderr, "\n        In case the filename contains a comma or spaces and options\n");
    fprintf(stderr,   "        need to be added, the syntax \"\\\"fn.ext\\\"{,opt}\" must be used\n");
    fprintf(stderr,   "        to clearly separate the filename from the options.\n");

    exit(1);
}
コード例 #2
0
ファイル: gbmhdr.c プロジェクト: ErisBlastar/osfree
static void show_noguess(const char *fn, const char *opt, int fd)
{
    int ft, n_ft;
    GBMFT gbmft;

    printf("%5ldKb %s\n",
           (gbm_io_lseek(fd, 0L, GBM_SEEK_END) + 1023) / 1024,
           fn);

    if ( gbm_guess_filetype(fn, &ft) == GBM_ERR_OK )
    {
        gbm_query_filetype(ft, &gbmft);
        printf("  file extension suggests bitmap format may be %-10s\n",
               gbmft.short_name);
    }

    gbm_query_n_filetypes(&n_ft);

    for ( ft = 0; ft < n_ft; ft++ )
    {
        GBM gbm;
        if ( gbm_read_header(fn, fd, ft, &gbm, opt) == GBM_ERR_OK )
        {
            gbm_query_filetype(ft, &gbmft);
            printf("  reading header suggests bitmap format may be %-10s - %4dx%-4d %2dbpp\n",
                   gbmft.short_name, gbm.w, gbm.h, gbm.bpp);
        }
    }
}
/*...susage:0:*/
static void usage(void)
	{
	int ft, n_ft;

	fprintf(stderr, "usage: %s [-m map] [-g gamma] [-s shelf] fn1.ext{,opt} [fn2.ext{,opt}]\n", progname);
	fprintf(stderr, "flags: -m map         mapping in the form ?_to_? (default: i_to_l), where ? is\n");
	fprintf(stderr, "                      i  physical intensitys (eg: raytracer output)\n");
	fprintf(stderr, "                      p  gamma corrected for a specific monitor\n");
	fprintf(stderr, "                      l  L* cyclometric linear perceived intensitys (as in PM)\n");
	fprintf(stderr, "       -g gamma       set monitor gamma (default 2.1)\n");
	fprintf(stderr, "       -s shelf       set monitor shelf (default 0.0)\n");
	fprintf(stderr, "                      gamma and shelf only used for mapping to or from p\n");
	fprintf(stderr, "                      for 8514 monitor gamma=2.3,shelf=0.136\n");
	fprintf(stderr, "                      for 8515 monitor gamma=2.1,shelf=0.0\n");
	fprintf(stderr, "       fn1.ext{,opt}  input filename (with any format specific options)\n");
	fprintf(stderr, "       fn2.ext{,opt}  optional output filename (or will use fn1 if not present)\n");
	fprintf(stderr, "                      ext's are used to deduce desired bitmap file formats\n");

	gbm_init();
	gbm_query_n_filetypes(&n_ft);
	for ( ft = 0; ft < n_ft; ft++ )
		{
		GBMFT gbmft;

		gbm_query_filetype(ft, &gbmft);
		fprintf(stderr, "                      %s when ext in [%s]\n",
			gbmft.short_name, gbmft.extensions);
		}
	gbm_deinit();

	fprintf(stderr, "       opt's          bitmap format specific options\n");

	exit(1);
	}
コード例 #4
0
ファイル: gbmsub.c プロジェクト: OS2World/APP-GRAPHICS-GBMV2
/*...susage:0:*/
static void usage(void)
	{
	int ft, n_ft;

	fprintf(stderr, "usage: %s [-x x] [-y y] [-w w] [-h h] [--]\n", progname);
	fprintf(stderr, "              \"fn1.ext\"{\\\",\\\"\"opt\"} [\"fn2.ext\"{\\\",\\\"\"opt\"}]\n");
	fprintf(stderr, "flags: -x x           left edge of rectangle (default 0)\n");
	fprintf(stderr, "       -y y           bottom edge of rectangle (default 0)\n");
	fprintf(stderr, "       -w w           width of rectangle (default width of image - x)\n");
	fprintf(stderr, "       -h h           height of rectangle (default height of image - y)\n");
	fprintf(stderr, "       fn1.ext{,opt}  input filename (with any format specific options)\n");
	fprintf(stderr, "       fn2.ext{,opt}  optional output filename (or will use fn1 if not present)\n");
	fprintf(stderr, "                      ext's are used to deduce desired bitmap file formats\n");

	gbm_init();
	gbm_query_n_filetypes(&n_ft);
	for ( ft = 0; ft < n_ft; ft++ )
		{
		GBMFT gbmft;

		gbm_query_filetype(ft, &gbmft);
		fprintf(stderr, "                      %s when ext in [%s]\n",
			gbmft.short_name, gbmft.extensions);
		}
	gbm_deinit();

	fprintf(stderr, "       opt's          bitmap format specific options\n");

	fprintf(stderr, "\n       In case the filename contains a comma or spaces and options\n");
    fprintf(stderr,   "       need to be added, syntax \"fn.ext\"{\\\",\\\"opt} or \"fn.ext\"{\\\",\\\"\"opt\"}\n");
    fprintf(stderr,   "       must be used to clearly separate the filename from the options.\n");

	exit(1);
	}
コード例 #5
0
ファイル: gbmsize.c プロジェクト: OS2World/APP-GRAPHICS-GBMV2
static void usage(void)
{
   int ft, n_ft;

   fprintf(stderr, "usage:\n");
   fprintf(stderr, "%s [-w w] [-h h] [-a] [-f f] \"fn1.ext\"{\\\",\\\"\"opt\"} [\"fn2.ext\"{\\\",\\\"\"opt\"}]\n", progname);
   fprintf(stderr, "-w w           new width of bitmap  (default width of bitmap)\n");
   fprintf(stderr, "-h h           new height of bitmap (default height of bitmap)\n");
   fprintf(stderr, "-a             preserve aspect ratio\n");
   fprintf(stderr, "-f f           do quality scaling using one of the algorithms:\n");
   fprintf(stderr, "               * simple (default)\n");
   fprintf(stderr, "               * nearestneighbor,bilinear,bell,bspline,mitchell,lanczos\n");
   fprintf(stderr, "               * blackman,catmullrom,quadratic,gaussian,kaiser\n");
   fprintf(stderr, "                 Note: Only grayscale and true color images.\n");
   fprintf(stderr, "fn1.ext{,opt}  input filename (with any format specific options)\n");
   fprintf(stderr, "fn2.ext{,opt}  optional output filename (or will use fn1 if not present)\n");
   fprintf(stderr, "               ext's are used to deduce desired bitmap file formats\n");

   gbm_init();
   gbm_query_n_filetypes(&n_ft);
   for ( ft = 0; ft < n_ft; ft++ )
   {
      GBMFT gbmft;

      gbm_query_filetype(ft, &gbmft);
      fprintf(stderr, "                      %s when ext in [%s]\n",
         gbmft.short_name, gbmft.extensions);
   }
   gbm_deinit();

   fprintf(stderr, "opt's          bitmap format specific options\n");

   fprintf(stderr, "\nIn case the filename contains a comma or spaces and options\n");
   fprintf(stderr,   "need to be added, syntax \"fn.ext\"{\\\",\\\"opt} or \"fn.ext\"{\\\",\\\"\"opt\"}\n");
   fprintf(stderr,   "must be used to clearly separate the filename from the options.\n");

   exit(1);
}