ip User Manualusage: ./ip [ -t ] [ -q ] [ -- ] [ file ]
ip recognizes some UNIX-style command line options.
When no options are specified, ip will run in OpenGL
mode with no image opened.
-h : Display usage information and exit.
-t : Run in text mode
-q : Run quietly - output errors only.
-- : No more arguments - next argument is
an image file to load.
file : Image file to load on startup.
The purpose of the -- flag is to keep from
confusing the parser if the image file name starts with a minus.
To illustrate,
./ip image.ppm // Run and load image.ppm ./ip -- image.ppm // Run and load image.ppm ./ip -- -funnyimage.ppm // Run and load -funnyimage.ppm ./ip -funnyimage.ppm // Fail and print usage
The default mode for ip is OpenGL mode. A GLUT
window will be created to display images and commands are
accessed via the pop-up menu. When user input is required (such
as the size of a blur filter to apply), stdin and stderr are used.
If a file is specified on the command line, it will be read in and
displayed in the window at startup.
If the -t options is present, ip will run
in Text Mode. No OpenGL window is created, and no interactive results
are given. Instead, a text menu is printed to stderr, and the user
selects which operations to preform by typing the corresponding menu
option number and hitting return. It's important to remember to
save the results before quitting, or they'll be lost.
The -q option supresses the printing of everything
except error messages when running in text mode. This is useful for
batch jobs, when excessive text can be annoying.
The purpose of the OpenGL interface is to provide immediate feedback to show the effects of the various image processor features. When a command is selected from the pop-up menu, the filter is applied to the currently loaded image and the resulting image is displayed. This way, filters can easily be tested and demonstrated, without the need to write scripts or open images with a separate program.
The mouse and keyboard control various aspects of ip when
the window is active.
right mouse : access popup menu
Q key : quit ip
Raise the popup menu by clicking and holding with the right mouse button inside the window.
File->Open... : load and display an image
File->Save : write current image to a
file; image file type is specified by the three-letter suffix on the
file name, defaulting to BMP
File->Get Info : print to stderr information the
image's width, height, number of channels and number of bits per channel.
File->Revert : reload and redisplay the current image
Process->* : apply the appropriate filter to the image,
after obtaining any necessary user input.
Help : print a short help message.
Quit : quit ip
ip recognizes a variety of different file formats for
input and output. The image file formats are BMP and PPM, and text mode
can handle a text script format for batch processing.
Two image formats are supported by ip - BMP and PPM.
BMP is Microsoft's raw bitmap format. ip supports writing
24-bit channel BMPs in binary format. For more information on the BMP
specification, take a look here
or here.
PPM is a very simple, easy to understand, read, write and edit format
for storing 24-bit 3-channel image data. ip supports writing
ascii PPMs. For more information on the PPM specification, take a look here.
Since Text Mode obtains user input solely from stdin, it's possible to
write a text file with a series of ip commands in it, and
redirect this file to stdin - ./ip -q -t < script.txt
The format for these scripts is very simple. The same input that would
be manually entered to ip should be put the same way into the
script. Here is an example script that opens image.ppm, applies a box
blur filter with a size of 5, saves it as blurred.bmp, and then quits.
2 ./image.ppm 6 5 3 ./image2.bmp 0
Paths are relative to the directory ip is executed from,
unless specified absolutely. Make sure to save the image you create and
then quit when done, or you could lose your results.
Harvey Mudd College
Professor Elizabeth Sweedyk
Stephen DiVerdi
Ethan Drucker
Joshdan Griffin
Jason Wither
© 2002