mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
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:
parent
7573373a5d
commit
a2fb7bf322
2 changed files with 63 additions and 0 deletions
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue