SeamDemo - acnelson12/CS-335-Algorithms GitHub Wiki

The design of the SeamDemo class was inspired by the command-line tools of the unix world. It is written to use arguments passed into main through the args parameter.

The following options are accepted:

  • -dim <width> <height>

    The desired new dimensions of the image can be entered here. If no -dim or -s options are specified, the program will shrink both dimensions of the image to 75% of the original values.

  • -f

    This option tells the program to use the fast variants of its shrinking algorithms. If this option is not used, the program will use methods designed to showcase the way the algorithms work by drawing the seams that are about to be removed then redisplaying the image after they have been removed.

  • -h

    As is conventional, this displays helpful information on how to pass arguments to the program.

  • -o <file>

    This tells the program to write the modified image to a file. No file will be written if this option is omitted.

  • -s <width> <height>

    This is like -dim, only instead of specifying the new dimensions of the image, the amount to remove from the image is specified. Again, if no -dim or -s options are specified, the program will shrink both dimensions of the image to 75% of the original values.

  • -w <time>

    When showcasing the algorithms, it may be desirable to slow them down so that it is easier to see what they are doing. This option specifies a wait-time in milliseconds for the program to wait after each seam is drawn.

⚠️ **GitHub.com Fallback** ⚠️