public LensFlareCommand(
LeadPoint centerPoint,
int brightness,
LensFlareCommandType type,
RasterColor color
)
public:
LensFlareCommand(
LeadPoint centerPoint,
int brightness,
LensFlareCommandType type,
RasterColor color
)
__init__(self,centerPoint,brightness,type,color) # Overloaded constructor
centerPoint
Point around which the effect is centered.
brightness
The brightness of the flare. This value is divided internally by 100. This parameter affects the brightness of both the flare, and any lightened circles surrounding the flare. This parameter only accepts positive values.
type
Flag that indicates the lens type.
color
Specifies the color of the main flare.
Run the LensFlareCommand on an image.
using Leadtools;
using Leadtools.Codecs;
using Leadtools.ImageProcessing.SpecialEffects;
public void LensFlareConstructorExample()
{
// Load an image
RasterCodecs codecs = new RasterCodecs();
codecs.ThrowExceptionsOnInvalidImages = true;
RasterImage image = codecs.Load(Path.Combine(LEAD_VARS.ImagesDir, "sample5.cmp"));
// Prepare the command
LensFlareCommand command = new LensFlareCommand(new LeadPoint(image.Width / 4, image.Height / 4), 100, LensFlareCommandType.Type1, new RasterColor(100, 150, 10));
// Apply the lens flare effect to the image.
command.Run(image);
codecs.Save(image, Path.Combine(LEAD_VARS.ImagesDir, "Result.jpg"), RasterImageFormat.Jpeg, 24);
}
static class LEAD_VARS
{
public const string ImagesDir = @"C:\LEADTOOLS23\Resources\Images";
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document