ip User Manual


  1. Table of Contents
    1. Table Of Contents
    2. Command Line Interface
      1. Options
      2. OpenGL Mode
      3. Text Mode
    3. OpenGL Interface
      1. Window Actions
      2. Menu Commands
    4. File Formats
      1. Images
      2. Scripts
    5. Features


  2. Command Line Interface
  3. usage: ./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.

    1. Options


    2. 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
      

    3. OpenGL Mode
    4. 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.

    5. Text Mode
    6. 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.

    Table Of Contents


  4. OpenGL Interface
  5. 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.

    1. Window Actions
    2. The mouse and keyboard control various aspects of ip when the window is active.

    3. Menu Commands
    4. Raise the popup menu by clicking and holding with the right mouse button inside the window.



    Table Of Contents


  6. File Formats
  7. 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.

    1. Images
    2. 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.

    3. Scripts
    4. 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.

    Table Of Contents


  8. Credits
  9. Harvey Mudd College
    Professor Elizabeth Sweedyk
    Stephen DiVerdi
    Ethan Drucker
    Joshdan Griffin
    Jason Wither
    © 2002

    Table Of Contents