<%

  rem **********************************************************************
  rem *
  rem * Simple Image creation that demos using BinaryWrite to write
  rem *  the image directly to the client
  rem *
  rem **********************************************************************


  rem **********************************************************************
  rem * Instantiate the object
  rem **********************************************************************
  Response.ContentType = "image/jpeg"
  'Response.ContentType = "image/png"


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

  rem **********************************************************************
  rem * Set various font parameters
  rem **********************************************************************
  Image.FontColor = vbYellow
  Image.Italic = True
  Image.Bold = True
  Image.FontName = "Arial"
  Image.FontSize = 12
  Image.PadSize = 10

  rem **********************************************************************
  rem * Calculate the size of the text info is and set the image to this size
  rem * (this has to be done since we want to fill the area with a gradient)
  rem * This demonstrates a multi-line text string
  rem **********************************************************************
  strMessage = "Steve's Widget Factory" & vbCrLf & "123 Park Avenue" & _
               VbCrLf & "Anytown, USA 012345"

  Image.MaxX = Image.TextWidth (strMessage)
  Image.MaxY = Image.TextHeight (strMessage)

  rem **********************************************************************
  rem * Create a one way gradient that starts with Red and ends with White
  rem **********************************************************************
  Image.GradientOneWay vbRed, vbWhite, 0

  rem **********************************************************************
  rem * Print our text to the image at the current X,Y position using 3D
  rem **********************************************************************
  Image.TextOut strMessage, Image.X, Image.Y, true

  'Image.ImageFormat = 3 ' For PNG

  Response.BinaryWrite Image.Image

  Set Image = nothing


%>