|
|
|
|
|
|
|
How to dynamically resize images by using ASP.NET FileUpload and ImageDraw
Prerequisites
- Neodynamic ImageDraw 2.0 (or greater) for ASP.NET (WebControl)
- Microsoft .NET Framework 2.0 (or greater)
- Microsoft Visual Studio 2005 or Visual Web Developer 2005 Express Edition
|
In the following Step-By-Step Guide we're going to create a simple ASP.NET WebForm that lets users to upload image files which will be resized on-the-fly by Neodynamic ImageDraw component.
Follow these steps:
- Open Visual Studio and create a new ASP.NET Website
- From the Solution Explorer, please add a reference to Neodynamic ImageDraw for ASP.NET assembly which file name is Neodynamic.WebControls.ImageDraw.dll
- Create/Open an ASP.NET WebForm ASPX and write the following content inside the Form tag:
At design-time, the WebForm should look like the following figure:
A simple WebForm featuring an ASP.NET FileUpload control
- After that, write the following code to handle the "Upload, Resize and Save" button's click event.
Visual Basic .NET
Visual C# .NET
- That's it. Run your application. Specify an image file and click on "Upload, Resize and Save" button.
The original uploaded image
The uploaded image is resized on-the-fly by ImageDraw classes and the output image is saved on disk.
The uploaded image dynamically resized on-the-fly by ImageDraw
If you need more information or assistance, please contact our
.
|
|
|
|
|
|
|