Added "Adjust" to the ImageHelper, this can change the brightness, contrast and gamma.

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@2469 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2013-02-07 13:19:01 +00:00
commit a2fb7bf322
2 changed files with 63 additions and 0 deletions

View file

@ -111,6 +111,33 @@ namespace Greenshot.Core {
}
}
/// <summary>
/// AdjustEffect
/// </summary>
public class AdjustEffect : IEffect {
public AdjustEffect() : base() {
Contrast = 1f;
Brightness = 1f;
Gamma = 1f;
}
public float Contrast {
get;
set;
}
public float Brightness {
get;
set;
}
public float Gamma {
get;
set;
}
public Image Apply(Image sourceImage, out Point offsetChange) {
offsetChange = Point.Empty;
return ImageHelper.Adjust(sourceImage, Brightness, Contrast, Gamma);
}
}
/// <summary>
/// InvertEffect
/// </summary>