Click here to Skip to main content
15,034,432 members
Articles / Programming Languages / C#
Posted 18 Nov 2006


157 bookmarked

A C# image enhancement filters library

Rate me:
Please Sign up or sign in to vote.
4.90/5 (51 votes)
11 May 2007LGPL32 min read
A set of filters to modify and style your images and photos

Library Home Page

Screenshot - box_colors2.png


This project started from a need. A need to have a simple image/photo .NET filters functionality to style and enhance pictures to be displayed on the web (or any other place for that matter). True, there are some filter libraries scattered around the web for doing stuff like a WaterMark or a GrayScale or even a collection of those (ImageMagick). In most cases they are very basic or unhelpful for styling images. Furthermore, the .NET System.Drawing.* namespace doesn't provide any basic or sophisticated capabilities. For example, there isn't a proper rotate or resize functionality. So the goal was to collect all of the nice .NET filters that are out there into a single package and to extend it by providing more useful and styled filters.


From the need that was described above I've created YAEL, which stands for: Yet Another Image Enhancement Library.

It is just a framework and filter classes. No UI (for now). The framework is very basic and simple so that extensions can easily be developed.

There is a basic IFilter interface and a BasicFilter abstract class. All of the filters derive from the BasicFilter class.

Current library filters consist of

  • Resize
  • Rotate
  • Grayscale
  • Rounded Corners
  • Boxing
  • Drop Shadow
  • Polaroid frame
  • Text and wartermark captions
  • Image watermark
  • Floor Reflection
  • FishEye
  • Skew
  • And more to come...

Here are some Samples:

Screenshot - grayScale_brighter.png

Screenshot - rotate_minus_30.png

Screenshot - rounded_35.png

Screenshot - box_colors2.png

Screenshot - dropShadow.png

Screenshot - dropShadow.png

Screenshot - text_water_middle_left.png

Screenshot - image_watermark_pacman.png

Screenshot - image_fisheye_default.png

Screenshot - image_floor_reflection.png

Screenshot - image_skew_plain.png


Usage is very straightforward. All you have to do is reference the library assemblies, load up an image, initialize a filter, execute the filter, and save back the transformed image.

Here is a sample:

static void Main(string[] args)
    Image myImg = Bitmap.FromFile("cat.jpg");
    Image transformedImage;
    ZRLabs.Yael.BasicFilters.TextWatermarkFilter watermark = new 
    ZRLabs.Yael.BasicFilters.BoxFilter box = new BoxFilter();
    ZRLabs.Yael.BasicFilters.BlackAndWhiteFilter blackAndWhite = new 

    //A text watermark example
    watermark.Caption = "Test";
    watermark.AutomaticTextSize = true;
    transformedImage = watermark.ExecuteFilter(myImg);

    //A boxing example
    transformedImage = box.ExecuteFilter(myImg);

    //A grayscale example
    transformedImage = blackAndWhite.ExecuteFilter(myImg);


  • 15-Dev-2006
    • V1.0.3.0 Released
      • Added the Fisheye, FloorReflection and Skew filters.
      • Added a pipeline helper class for easy and fluent transformations.
  • 28-Nov-2006
    • Added the ability to use images on the BoxFilter on the top and side panels.
      Check out the samples page for examples.
  • 27-Nov-2006
    • Added a KeepAspectRatio property to the ResizeFilter
  • 23-Nov-2006
    • Added an image watermark filter
    • Changed the license to LGPL


This article, along with any associated source code and files, is licensed under The GNU Lesser General Public License (LGPLv3)


About the Author

Roiy Zysman
Web Developer
United States United States
No Biography provided

Comments and Discussions

Questionerror dat unsafe code may only appear if compiling with /unsafe Pin
gauravSushmita9-Oct-12 3:17
MembergauravSushmita9-Oct-12 3:17 
GeneralMy vote of 5 Pin
Aamer Alduais10-May-12 9:00
MemberAamer Alduais10-May-12 9:00 
QuestionI CAN NOT USING THE FILTERS IN VS2008. NET Framework 3.5 Pin
LuizItatiba21-Nov-11 14:47
MemberLuizItatiba21-Nov-11 14:47 
QuestionGDI because it gives error in my ASP.NET AJAX ENABLED WEB APPLICATION when using AC # image enhancement filters library published in the WEB Pin
LuizItatiba17-Jan-09 1:57
MemberLuizItatiba17-Jan-09 1:57 
QuestionUsing the FileUpload Control with AC # image enhancement filters library Pin
LuizItatiba16-Jan-09 18:37
MemberLuizItatiba16-Jan-09 18:37 
QuestionDropShadow Pin
adsaero28-Oct-08 5:50
Memberadsaero28-Oct-08 5:50 
AnswerRe: DropShadow Pin
Roiy Zysman31-Oct-08 12:28
MemberRoiy Zysman31-Oct-08 12:28 
Questionhow to use the textWaterMark so that the text is upright? Pin
LuizItatiba15-Oct-08 8:14
MemberLuizItatiba15-Oct-08 8:14 
AnswerRe: how to use the textWaterMark so that the text is upright? Pin
Roiy Zysman15-Oct-08 23:44
MemberRoiy Zysman15-Oct-08 23:44 
GeneralRe: how to use the textWaterMark so that the text is upright? Pin
LuizItatiba16-Oct-08 6:17
MemberLuizItatiba16-Oct-08 6:17 
GeneralFilters are available for online editing at Pin
Roiy Zysman14-Oct-08 10:38
MemberRoiy Zysman14-Oct-08 10:38 
QuestionAssigning two lines of Caption Pin
LuizItatiba21-Jul-08 18:51
MemberLuizItatiba21-Jul-08 18:51 
QuestionWhat the Validation component of the examples Pin
LuizItatiba21-Jul-08 9:25
MemberLuizItatiba21-Jul-08 9:25 
QuestionDoubts in relation to the background color of the filter Rounded Corners Filter Pin
LuizItatiba20-Jul-08 19:06
MemberLuizItatiba20-Jul-08 19:06 
AnswerRe: Doubts in relation to the background color of the filter Rounded Corners Filter Pin
Roiy Zysman21-Jul-08 5:30
MemberRoiy Zysman21-Jul-08 5:30 
GeneralRe: Doubts in relation to the background color of the filter Rounded Corners Filter Pin
LuizItatiba21-Jul-08 7:23
MemberLuizItatiba21-Jul-08 7:23 
AnswerRe: Doubts in relation to the background color of the filter Rounded Corners Filter Pin
Roiy Zysman21-Jul-08 8:11
MemberRoiy Zysman21-Jul-08 8:11 
GeneralRe: Doubts in relation to the background color of the filter Rounded Corners Filter Pin
LuizItatiba21-Jul-08 8:31
MemberLuizItatiba21-Jul-08 8:31 
GeneralWorking with Drop Shadow filter in dark pages with funds Pin
LuizItatiba20-Jul-08 13:37
MemberLuizItatiba20-Jul-08 13:37 
QuestionDoubts over its code example Pin
LuizItatiba20-Jul-08 12:46
MemberLuizItatiba20-Jul-08 12:46 
AnswerRe: Doubts over its code example Pin
Roiy Zysman21-Jul-08 5:32
MemberRoiy Zysman21-Jul-08 5:32 
QuestionRe: Doubts over its code example Pin
LuizItatiba21-Jul-08 7:20
MemberLuizItatiba21-Jul-08 7:20 
GeneralI saw your link in Samples of Pin
LuizItatiba18-Jul-08 16:48
MemberLuizItatiba18-Jul-08 16:48 
AnswerRe: I saw your link in Samples of Pin
Roiy Zysman18-Jul-08 23:51
MemberRoiy Zysman18-Jul-08 23:51 
QuestionRe: I saw your link in Samples of Pin
LuizItatiba19-Jul-08 7:04
MemberLuizItatiba19-Jul-08 7:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.