

        \\\\\\\\\\\\\\\\\\\\ ///////////////////////

        example programs using the image object

        //////////////////// \\\\\\\\\\\\\\\\\\\\\\

01.simple/
   This simple introductory program creates a window with an image object; the
   image displayed is the mandril image, which is specified using the keyword
   syntax rather than the absolute path to the image.

02.recreate/
   This example program creates a window containing an image object that will
   be used to cycle through a number of predefined images.  An event handler
   allows you to switch to the next image by clicking on the image.
   An event handler destroys the old image object, and creates a new image
   object with the next image (as opposed to example 3, which creates the new
   image in place).   An event handler allows you to quit by pressing 'q'.

03.cycle/
   This example program creates a window containing an image object that will
   be used to cycle through a number of predefined images.  An event handler
   allows you to switch to the next image by clicking on the image.
   The event handler simply changes the image that is displayed in the image
   object  (as opposed to example 2, which destroys the old image and creates
   a new one). The same event handler allows you to quit by pressing 'q' or 'Q'.

04.create_sin/
   This program uses polymorphic data services to create a data object 
   containing a sinusoid, and puts up an image visual object to display the 
   sinusoidal image. An event handler allows you to hit 'q' or 'Q' to quit.

05.interp_pad/
   This program reads in the ball image, and then uses polymorphic data 
   services to increase the size of the of ball by padding with a value 
   of 150; this produces a grey border to the right and bottom of the image. 
   The large, padded image is displayed. An event handler exits program 
   on key press 'Q' or 'q'.

06.interp_0order/
   This program reads in the ball image, increases the size of the of ball by
   doing a zero order interpolation, and then displays the enlarged image.
   The use of the action handler is neater for the specific key press 'q' than
   the use of the event handler as in examples 4 and 5 (compare the two
   approaches).

07.interp_1order/
   NOTE: A documented bug in 1st order interpolation prevents this example
   from working correctly.
   This program reads in the ball image, increases the size of the of ball by
   doing a first order interpolation, and then displays the enlarged image.
   Installs an action handler to exit the program when the user presses 'q'.


08.parent_image/
   Here, the Khoros Manager widget that is to serve as the
   parent for the image object is created specifically;  the
   toplevel widget is created automatically since the first parameter
   to xvw_create_manager() is NULL. An image object is created within
   the parent, and an action handler installed that uses the client_data
   pointer to pass a string as a parameter.   A pop-up information object
   is used.

09.scramble/
   This program puts up an image of the mandril, and creates two buttons,
   one labelled, '<' and one labelled, '>'.  When you click on either of the
   buttons, a callback will scramble the image region by region, and then
   reverse the process to unscramble the image region by region to restore
   the original image. After the scrambling procedure is finished, the region 
   size is multiplied by 2 when the '>' button is used, divided by 2 when the
   '<' button is used.  A label object between the two buttons displays the
   current number of regions being used; an action handler is used to quit
   the image on the specific key press 'q'.

10.scramble_norm/
   This program operates very similarly to the scrambling image example in
   09.scramble/.  However, this version normalizes each region before
   it restores the region;  this produces a patchwork effect which is more
   pronounced with each scrambling/descrambling operation, in contrast to
   the example in 09.scramble/, where the descrambling procedure simply
   restores the original image.

11.collage/
   This example shows how you can display all the image bands in a sequence
   at one time;  layout is done automatically with the rowcol object.  The
   images would take up a very large amount of space, so we create an image
   icon from each image band, and then display the set in the rowcol object.

12.invert_region/
   This program puts up an image, and installs an event handler which will 
   invert the image region by region when the button is pressed.
   An action handler allows the user to quit the program by pressing 'q'.

13.invert_line/
  Like example 12.invert_region/, this program also inverts the image. 
  However, while example 12 inverts the image region by region, this 
  example inverts the image line by line (when you button press in the 
  image).

14.roamer/
   This example displays the large map image, limiting the image window
   to a size of 512x512.  It puts up a pan icon, so you can see which 
   portion of the image is being displayed in the image window at any given
   time.  It then installs a timeout that will be called repeatedly to reset
   the area of the image which is being displayed in the image window, causing
   a "roaming" effect.  The "roaming" action is reflected by corresponding
   movement of the pan box in the pan icon.

15.update/
   This example program creates a window containing an image object
   that we will update in different ways.  The initial image is empty,
   containing no data -- it will appear to be a black image.
  
   => CLICK THE MOUSE on the image to start the first update.  This
      creates a sine image, putting data one line at a time.  This is
      being done with backing store turned on.
   => CLICK THE MOUSE on the image to go to the next update.  This
      creates a cosine image, putting data one line at a time.  This time
      backing store is turned off.  Notice that the update time is much
      faster.
   => CLICK THE MOUSE on the image to go to the next update.  This
      creates a sine image, putting the entire image at once.
   => CLICK THE MOUSE on the image to go to the next update.  This
      creates a grey region on the image.  This is a simple region put.

   Note that whether the data being put is a single line, or the whole
   image, or even just a region, the update time is roughly the same.
   Clicking again will cycle back to the first case.
  
   SOME COMMENTS ON BACKING STORE :
   The drawback of this feature is this : annotations can not be interactively
   moved around on the image as cleanly.  If you don't need interactive
   annotations, you certainly don't need to consider setting this attribute.
   Under consideration is a method for the image visual object to automagically
   detect if any of it's children are annotations (or more precisely, if
   they are gadgets) and set the backing store accordingly.

16.screendump/
   This program puts up an image and makes a screen dump of it.
   The screen dump file will be called, "out.viff"

