G
Greg Collins [InfoPath MVP]
I couldn't find what I was looking for doing a search through the newsgroup, so here goes...
I'm have a Web site user registration confirmation page that I want to show a set of random numbers (images) which the user has to look at and type into a field for verification that this is really a user and not a bot. If you've registered for some more formal Web sites, you've seen what I'm talking about.
My question is this:
I have a series of image files for the numbers 0 through 9 (four different sets of them actually). I want to have an ASP.NET page that reads a Session variable to get the random #, and then generate a SINGLE image file which it then returns to the calling page.
What I need is some C# code that will load a series of image files and combine them horizontally into a single image. I'm sure this can be done... I just don't know where to start.
So if I had my Session variable with a value of '8675309', I would want to load the image file for each of those individual numbers, 'number8.gif', 'number6.gif', ... 'number9.gif'. Each of these files are the exact same height and width. Therefore I want to create an in memory image of width*7 by height, and copy the image from each file into the correct spot in the in memory image. When done I return this image.
Will you share with me the C# code needed to accomplish this?
I'm have a Web site user registration confirmation page that I want to show a set of random numbers (images) which the user has to look at and type into a field for verification that this is really a user and not a bot. If you've registered for some more formal Web sites, you've seen what I'm talking about.
My question is this:
I have a series of image files for the numbers 0 through 9 (four different sets of them actually). I want to have an ASP.NET page that reads a Session variable to get the random #, and then generate a SINGLE image file which it then returns to the calling page.
What I need is some C# code that will load a series of image files and combine them horizontally into a single image. I'm sure this can be done... I just don't know where to start.
So if I had my Session variable with a value of '8675309', I would want to load the image file for each of those individual numbers, 'number8.gif', 'number6.gif', ... 'number9.gif'. Each of these files are the exact same height and width. Therefore I want to create an in memory image of width*7 by height, and copy the image from each file into the correct spot in the in memory image. When done I return this image.
Will you share with me the C# code needed to accomplish this?