Home Page
|
Blog
|
Online Forum
|
Links
|
SiteMap
Home
Products
CoolWatermark
Sample Code
Sample Figures
Demo
Demo for v2.x
PhotoController
Sample Code
Sample Figures
Demo
Demo for v2.x
New Image Filters
Download
Purchase
.NET Components Library
.NET Books Library
Forum
Help
EULA
Blog
Links
Sitemap
- Recommended .NET Book -
Book Description Get in-depth coverage and expert insights on advanced ADO.NET programming topics s...
[more]
Home
>
Products
>
PhotoController
>
Demo
Overview
This page demonstrates only some filters in
PhotoController v1.x
, which provides many other powerful functions to process image. It is strongly recommended to download the
demo application
to try all of them. The full source code is available for you.
Image Filters
Choose the filter in the dropdown list and click [Apply] button, you will see the below image processed by the specified filter.
Sepia
ColorNoise
GaussianBlur
Sharpen
Water
Diffuse
Mosaic
internet advertising, online marketing
Code
The following C# source shows the code behinde of this demonstration.
string
filter = Request.QueryString[
"filter"
].ToString();
int
level = 20;
FilterStyle fs = FilterStyle.Sepia ;
switch
(filter) {
case
"Sepia"
:
{
fs = FilterStyle.Sepia;
level = 22;
break
;
}
case
"ColorNoise"
:
{
fs = FilterStyle.ColorNoise;
level = 20;
break
;
}
case
"GaussianBlur"
:
{
fs = FilterStyle.GaussianBlur;
level = 10;
break
;
}
case
"Sharpen"
:
{
fs = FilterStyle.Sharpen;
level = 3;
break
;
}
case
"Water"
:
{
fs = FilterStyle.Water;
level = 15;
break
;
}
case
"Diffuse"
:
{
fs = FilterStyle.Diffuse;
level = 10;
break
;
}
case
"Mosaic"
:
{
fs = FilterStyle.Mosaic;
level = 10;
break
;
}
}
Bitmap bm =
new
Bitmap(sample);
Filters filters =
new
Filters(fs, level);
Controller objPC =
new
Controller(bm);
Bitmap bitmap =
new
Bitmap( objPC.Filter(filters) );
objPC.Dispose();
MemoryStream oStream =
new
MemoryStream();
bitmap.Save(oStream, System.Drawing.Imaging.ImageFormat.Jpeg);
Response.BinaryWrite(oStream.ToArray());
bm.Dispose();
bitmap.Dispose();
Response.End();
Quick Search
Components
Books
Sponsors
Home
|
Links
|
Blog
|
SiteMap
|
About
|
2005-2007 © imageComponent.NET, All Rights Reserved.