Eric Chudow Lee Gumnic Dec 2005 Our web service provides custom images. The client may specify a text message to appear on the image, and receives it as an array of bytes representing a jpeg file. Additionally, the client may choose to send the image as an email to a specified SEAS address. The web page allows you to specify message text as well as all parameters for an email. Additionally it provides a dynamic image file that returns the image to a web browser. This image URL can be used by users of the web site. The web service does not use that image for the emails since it shouldn’t be depending on one of its clients. It instead embeds the jpeg file in the email itself which is where we spent the majority of our time. The service is located at http://harbormist.com/webservice/AddTextToImage/Service.asmx We changes all of the default file names but left Service.aspx alone because that seems to be a standard place to look for the WSDL. The source is in the DynamicImageGenerator folder in this zip. The web page is located at http://harbormist.com/webclient/AddTextToImage/ Notes on source: • ImageText o AppCode ? GlobalInfo.cs • Encapsulates some global constants o Default.aspx(.cs) ? The main interface of the web site ? Provides forms to interact with the web service o Image.aspx(.cs) ? An asp file encapsulating the image ? Changes the content type to image/jpeg ? Writes the bytes from the web service to the response ? Creates a 500 server error if the service fails • DynamicImageGenerator o AppCode ? GlobalInfo.cs • Encapsulates some global variables ? Service.cs • Implements the web service • CreateImage o Creates an altered image in memory o Returns as a byte array • Sendmail o Takes altered image from createimage and sends it by email o Jpeg file is created in the temp directory and then sent