The following example images show the effect of AutoLevels at different clipping levels.
[C#]
void function() {
using (Doc doc = new Doc()) {
AddImagePage(doc, img1); // original image
doc.Rendering.Save("EffectAutoLevels5.jpg");
using (ImageLayer layer = AddImagePage(doc, img1)) {
using (EffectOperation effect = new EffectOperation("Auto Levels")) {
effect.Parameters["Clip"].Value = 0.5;
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectAutoLevels50.jpg");
using (ImageLayer layer = AddImagePage(doc, img1)) {
using (EffectOperation effect = new EffectOperation("Auto Levels")) {
effect.Parameters["Clip"].Value = 5.0;
effect.Apply(layer.PixMap);
}
}
doc.Rendering.Save("EffectAutoLevels.jpg");
}
}
[Visual Basic]
Sub ...
Using doc As New Doc()
AddImagePage(doc, img1)
' original image
doc.Rendering.Save("EffectAutoLevels5.jpg")
Using layer As ImageLayer = AddImagePage(doc, img1)
Using effect As New EffectOperation("Auto Levels")
effect.Parameters("Clip").Value = 0.5
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectAutoLevels50.jpg")
Using layer As ImageLayer = AddImagePage(doc, img1)
Using effect As New EffectOperation("Auto Levels")
effect.Parameters("Clip").Value = 5.0
effect.Apply(layer.PixMap)
End Using
End Using
doc.Rendering.Save("EffectAutoLevels.jpg")
End Using
End Sub
Original Image before AutoLevels |
After AutoLevels Clip 0.5% |
After AutoLevels Clip 5.0% |
|
|
|