124 char *infilename = NULL,
156 "% s%-xscale!Fyscale!F S%-xsize!Fysize!F c%- a%-angle!F b%-blur!F v%- \
157 p%-xorg!dyorg!d t%-xoff!Fyoff!F \to%-outfile!s infile%s",
158 &scaleflag, &xscale, &yscale,
163 &translateflag, &xtrans, &ytrans,
164 &oflag, &out_fname, &infilename ) == 0)
174 if (fabs(angle) > 45.0)
176 "fant: Warning: angle larger than 45 degrees, image will blur.\n");
181 "%s: size option (-S) is incompatible with the angle (-a), scale (-s),\n\
182 \ttranslate (-t) and origin (-p) options\n",
188 "%s: center option (-c) ignored without size option (-S)\n",
193 fprintf( stderr,
"fant: blur factor must be positive\n" );
197 if ((scaleflag && xscale == 1.0) && (angle == 0.0))
201 fprintf(stderr,
"fant: Only performing vertical pass\n");
237 xscale =
xsize / (p[2].
x - p[1].
x);
238 yscale = ysize / (p[3].
y - p[2].
y);
244 if ( xscale < yscale )
248 ytrans = (ysize - (p[3].
y - p[2].
y) * yscale) / 2;
253 xtrans = (
xsize - (p[2].
x - p[1].
x) * xscale) / 2;
259 xform_points(p, xscale, yscale, angle, xtrans, ytrans );
302 for (i = 1; i <= 4; i++)
int scanargs(int argc, char **argv, const char *format,...)
void rle_addhist(char *argv[], rle_hdr *in_hdr, rle_hdr *out_hdr)
void rle_puteof(rle_hdr *the_hdr)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
int rle_get_setup(rle_hdr *the_hdr)
int rle_get_error(int code, const char *pgmname, const char *fname)
rle_hdr * rle_hdr_cp(rle_hdr *from_hdr, rle_hdr *to_hdr)
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
char * cmd_name(char **argv)
#define RLE_CHECK_ALLOC(pgm, ptr, name)
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)