<html>
<head>
<title>Image Modification Demo</title>
</head>
<body bgcolor=white>
<center>
<p><br></p><p><br></p>
<%

  rem ********************************************************************
  rem *
  rem * Note: This demo uses the lanmannt.bmp file. You can change to
  rem *       another BMP if you like but you'll have to modify the XY
  rem *       values to fit within your BMP image or set AutoSize = true
  rem *
  rem ********************************************************************

  rem **********************************************************************
  rem * Instantiate the object
  rem **********************************************************************
  Set Image = Server.CreateObject("AspImage.Image")

  rem **********************************************************************
  rem * If AutoSize is false then any text that exceeds the current image
  rem *   will be clipped.
  rem **********************************************************************
  Image.AutoSize = false

  rem **********************************************************************
  rem * Load a BMP. You can load JPG and BMP files
  rem **********************************************************************
  Image.LoadImage("d:\winnt\lanmannt.bmp")

  rem **********************************************************************
  rem * Set some font properties, set the X and Y location and write some
  rem *   text out to the loaded image
  rem **********************************************************************
  Image.FontName = "MS Sans Serif"
  Image.FontColor = vbRed
  Image.FontSize = 6
  Image.TextOut "SteveG's Demo", 370, 57, false

  rem **********************************************************************
  rem * Set some font properties, set the X and Y location and write some
  rem *   3D'd text out to the loaded image
  rem **********************************************************************
  Image.Bold = True
  Image.FontSize = 12
  Image.X = 160
  Image.Y = 230
  Image.TextOut "ASP Improved Version", Image.X, Image.Y, true


  rem **********************************************************************
  rem * Demostrate the fact that X has been moved forward beyond the
  rem *   original 160. Just add 20 to bump it over a little
  rem **********************************************************************
  Image.TextOut "X =" & Image.X, Image.X + 14, Image.Y, true


  rem **********************************************************************
  rem * Show how to calculate the next Y value. We'll take the previous Y value
  rem *   of 230 and add the TextHeight of the string XYZ to determine what our
  rem *   new Y starting value should be
  rem **********************************************************************
  Image.X = 160
  Image.Y = Image.Y + Image.TextHeight("XYZ")
  Image.FontSize = 10
  Image.TextOut Now, Image.X, Image.Y, false


  rem **********************************************************************
  rem * Set the physical path for the FileName we are going to save
  rem *   NOTE: You should gen the filename dynamically for multiuser usage
  rem **********************************************************************
  Image.FileName = "d:\inetpub\wwwroot\images\lman.jpg"

  rem **********************************************************************
  rem * Save the image
  rem **********************************************************************
  Image.SaveImage

  rem **********************************************************************
  rem * Now write the <img src> tag out for the browser to pick up
  rem **********************************************************************
  Response.Write "<img src=""/images/lman.jpg""><br>"

  rem **********************************************************************
  rem * These properties give eval/registration information for the component
  rem **********************************************************************
  rem Response.Write "<p>Expires: " & Image.Expires
  rem Response.Write "<br>Version: " & Image.Version
  rem Response.Write "<br>Registered To: " & Image.RegisteredTo

  Set Image = nothing

%>
</center>
</body>
</html>