9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] First/second edition image manipulation tools
@ 2008-06-12  3:33 Pietro Gagliardi
  2008-06-12  3:46 ` Russ Cox
  0 siblings, 1 reply; 5+ messages in thread
From: Pietro Gagliardi @ 2008-06-12  3:33 UTC (permalink / raw)
  To: Fans of the OS Plan 9 from Bell Labs

Hello.

My next experiment in learning libraries, as well as my next project,
is a reimplementation of the first and second edition raster graphics
manipulation tools. These use libmemdraw, which provides Memimage.
Since I only have a working first edition manual, the program I will
present shortly conforms to the first edition.

NAME
	transpose - re-orient an image
SYNOPSIS
	transpose [-vhadrlui] [-o 'x y'] [imgfile]
DESCRIPTION
	transpose produces an image from another image by applying a
transformation
	that satisfies the property of involution. The options are:

		-d	Reflect image through descending axis (y=-x), the default
		-a	Reflect image through ascending axis (y=x)
		-v	Reflect image left-to-right through vertical center line (x=0)
		-h	Reflect image top-to-bottom through horizontal center line (y=0)
		-r	Rotates image right 90 degrees (clockwise)
		-l	Rotates image left 90 degrees (counterclockwise)
		-u	Rotates image upside down (180 degrees)
		-i	Identity (for completeness)

	If the -o option is given, the new image has the upper-left
coordinates given as an
	argument. Otherwise, the original upper-left coordinates are used.
EXAMPLES
	Mirror image.
		transpose -v img > img2
	Set the origin of an image to (0,0) without changing any pixels.
		transpose -i -o '0 0' img > img2
	Involution exposition.
		transpose img | transpose > img2
BUGS
	The first edition specified the arguments to -o as two values - this
cannot be done
	due to idiosyncrasies with args(2).

	What should I do to supply something like -o outfile?

	O(N^2) algorithms, even with -i - using -o makes the running time
O(2(N^2)).

You can find it in /n/sources/contrib/pietro/transpose.c.

Pietro




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-06-12 14:29 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-12  3:33 [9fans] First/second edition image manipulation tools Pietro Gagliardi
2008-06-12  3:46 ` Russ Cox
2008-06-12  3:57   ` Pietro Gagliardi
2008-06-12  8:24     ` Charles Forsyth
2008-06-12 14:29     ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).