Xref: utzoo alt.graphics.pixutils:674 comp.graphics:15820 Path: utzoo!utgpu!cs.utexas.edu!sun-barr!lll-winken!elroy.jpl.nasa.gov!usc!tarazed.usc.edu!rslau From: rslau@tarazed.usc.edu (Robert Lau) Newsgroups: alt.graphics.pixutils,comp.graphics Subject: Re: how to give pnmrotate a negative angle? Message-ID: Date: 6 Feb 91 23:38:54 GMT References: <865@keele.keele.ac.uk> Sender: news@usc Followup-To: alt.graphics.pixutils Organization: University of Southern California, USA Lines: 41 Nntp-Posting-Host: tarazed.usc.edu In-reply-to: cca13@seq1.keele.ac.uk's message of 6 Feb 91 14:21:20 GMT Originator: rslau@tarazed.usc.edu In article <865@keele.keele.ac.uk> cca13@seq1.keele.ac.uk (G.D. Pratt) writes: Can anyone tell me how to tell the pnmrotate command, in the new beta release of PBMPLUS, how to rotate the image by a negative angle since it appears to take the "-" as the flag symbol as in:- pnmrotate -10 < turing.pgm > fred.pgm usage: pnmrotate [-noantialias] [pnmfile] from the source: if ( argn < argc && argv[argn][0] == '-' && argv[argn][1] != '\0' ) { if ( pm_keymatch( argv[argn], "-antialias", 2 ) ) antialias = 1; else if ( pm_keymatch( argv[argn], "-noantialias", 2 ) ) antialias = 0; else pm_usage( usage ); ++argn; } if ( argn == argc ) pm_usage( usage ); if ( sscanf( argv[argn], "%f", &fangle ) != 1 ) pm_usage( usage ); It only checks the first flagged option, so if you want a negative angle, you'll need to add a -antialias (yes, it's the default but...) followed by the negative angle: pnmrotate -antialias -45 < {file}.ppm > {file}.ppm.rot Bug? nah :) -robert -- Robert Lau 213.740.2866 Unix Systems Internet: rslau@usc.edu University Computing Services UUCP: ...!uunet!usc!rslau University of Southern California Bitnet: RSLAU@GAMERA