Flip an Image One or More Ways

USAGE:
pgm.flip.image(x, lr=F, leftright=F, tb=F, topbottom=F,
                  transpose=F, xy=F, rotate90=F, r90=F, ccw=F,
                  rotate270=F, r270=F, cw=F, rotate180=F, r180=F)
x:
an image object
lr:
leftright:
logical, flip left to right
tb:
topbottom:
logical, flip top to bottom
transpose:
xy:
logical, flip by transposition
rotate90:
r90:
ccw:
logical, rotate 90 degrees (ie counterclockwise)
rotate270:
r270:
cw:
logical, rotate 270 degrees (ie clockwise)
rotate180:
r180:
logical, rotate by 180 degrees.

VALUE:
an image object, being the result of flipping x according to the combination of the flip arguments specified. Note that some combinations are equivalent (eg xy and tb is the same as just r90)

pgm.flip.image is a function interfacing to the pbmplus package of Jef Poskanzer, calling pnmflip with appropriate arguments as specified. pnmflip is copyrighted by Jef Poskanzer.


REFERENCE:
John M. Chambers and Neil Crellin, "Images in S" AT&T Bell Laboratories Stat. Res. Report No. 100 (Dec. 1991)

EXAMPLES:
r180img <- pgm.flip.image(img, r180=T)
rightimg <- pgm.flip.image(upside.down.img, tb=T)