How to dynamically create composite images using embedded images in ASP.NET Resource RESX
Technologies used
- Neodynamic ImageDraw (2.0 or later) for ASP.NET
- Microsoft .NET Framework (2.0 or later)
- Microsoft Visual Studio .NET (2005 or later - Visual Web Developer Express Edition)
|
 |
 |
In the following guide you'll learn how to use images embedded into ASP.NET Resources Files (*.RESX) to create composite images through ImageDraw.
In this guide we'll use ASP.NET Resources Expression which is only available for ASP.NET 2.0 or later. Because that, we'll use Visual Studio 2005 (Visual Web Developer Express Edition can be use as well).
The idea behind this guide is to dynamically create Composite Images merging some static image files with other images which are embedded into resources files (*.RESX) for a fictitious MSN Music site. In this sample the MSN logo and the butterfly images are embedded into an ASP.NET Resource file. In addition, a predefined set of static images about Music Artists embedded into an XML file - stored in Base64 string format - are used to merge both and to get the output image. The following image tries to provide you with a preview of what we want to accomplish with this demo.
 The original artist photo and MSN Logo images embedded into RESX file that will be merged to create the Music Website.
Follow these steps
- Open VS 2005 and create a new Website.
- The project will contain an XML file (artists.xml) with Music Artists info, included the Artist's photo in Base64 string format. The project also contains a global resource file called MsnResources.resx maintaining the MSN logo images embedded into it as is shown in the following figure.
All needed files are available for downloading at the end of this guide.
- In this guide we'll only explain how to use an embedded image resource to get the following artist image:
The above image is a combination of:
- An artist photo stored into an XML file in Base64 string format
- An Image (MSN Butterfly) embedded into a resource (*.RESX) file
To get the sample image working follow these steps:
- There are more settings to be done for this demo but the previous steps are all what you need to know for using Images embedded into a Resource (*.RESX) file. Please, download the sample files at the end of this guide to get it completed.
- If you run the application, you should get something like this.
The Artist photo with the MSN Butterfly logo embedded into a RESX file, both merged using ImageDraw
Sample Files Download
Here are the VB.NET and C# versions of this sample. Please, download the zip file you want to. After extract it you'll find all necessary files to reproduce this step by step guide.
Remember to download and install ImageDraw in order to reproduce this sample demo.
If you need more information or assistance, please contact our
.
|