ASP 101 - Active Server Pages 101 - Web03
The Place ASP Developers Go!



Windows Technology Windows Technology
15 Seconds
4GuysFromRolla.com
ASP 101
ASP Wire
VB Forums
VB Wire
WinDrivers.com
internet.commerce internet.commerce
Partners & Affiliates
ASP 101 is an
internet.com site
ASP 101 is an internet.com site
IT
Developer
Internet News
Small Business
Personal Technology

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers

ASP 101 News Flash ASP 101 News Flash





ASP.NET version of "Image Flip"


Based on the amount of feedback we received on our Name Tag sample, it seems that a lot of you are interested in manipulating images from an ASP.NET page. While images really aren't our specialty, that's never stopped us before... which brings us to the sample code at hand.

This sample walks you through how to load an image from the file system, perform some simple image manipulation on it using ASP.NET's graphics capabilities, and return the resulting image to the browser. For illustration, three different transformations are applied to the image. The first is that the image is flipped so that it appears as a mirror image of the original. The second swaps all the white pixels for red ones. The third reduces the red component of the image giving it a nice blue-green tint.

There's obviously a lot more you could do to the image, but the important thing here is to get comfortable working with graphics and get something simple working that you can then use as a starting point for more advanced scripts.

The image being used is one from our old Photo Gallery sample. I've simply renamed it for use here.

Here's a zip file of the code along with the sample image (54 KB).

Play with the running version.

View the live source code.



Samples

Home |  News |  Samples |  Articles |  Lessons |  Resources |  Forum |  Links |  Search |  Feedback

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers