Image Web Service
page 1 of 1
Published: 24 Mar 2004
Unedited - Community Contributed
Abstract
This is a practical example of how a web service can use GDI+ functionality to return image data and how you can then consume this web service.
by Chris Garrett
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 38013/ 36

Image Web Service

This is a practical example of how a web service can use GDI+ functionality to return image data and how you can then consume this web service.

The web service creates an image based on the requested text, font, alignment and colours that you supply in a call to the DrawText webmethod.

Your image data is then returned as an array of bytes which you then must reconstruct in your client application using an input stream.

As you will see if you view the source, the client application is very simple. This code could be simplified even further by putting the stream and bitmap creation code into a custom proxy rather than relying on the proxy created by the .NET command line tools.

To use the web service in your own applications, download the .dll and put it in your web application bin directory or add a web reference in Visual Studio.NET

 

Try it out
/chrisg/tools/testtextgraphic.aspx
/chrisg/tools/textgraphic.asmx

View Source
/chrisg/tools/view-testtextgraphic.aspx.asp
/chrisg/tools/view-textgraphic.asmx.asp

Download
/chrisg/tools/download.asp?file=testtextgraphic.aspx
/chrisg/tools/download.asp?file=textgraphic.asmx
/chrisg/tools/download.asp?file=textGraphicProxy.dll



User Comments

No comments posted yet.

Product Spotlight
Product Spotlight 





Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2014 ASPAlliance.com  |  Page Processed at 4/18/2014 2:13:05 PM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search