Combines image data from two images with feathering. The two images can be combined with variable opacity applied by specifying the region of a fade mask image. This command is available in the
Raster Pro and above toolkits.
Syntax
Example
Visual Basic | Copy Code |
---|
ImageProcessing.Effects.FeatherAlphaBlendCommand
Public Sub FeatherAlphaBlendCommandExample()
RasterCodecs.Startup()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")
Dim command As FeatherAlphaBlendCommand = New FeatherAlphaBlendCommand
command.DestinationRectangle = New Rectangle(0, 0, leadImage.Width \ 2, leadImage.Height \ 2)
command.MaskImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image3.cmp", 24, CodecsLoadByteOrder.Bgr, 1, 1)
command.SourceImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image2.cmp", 24, CodecsLoadByteOrder.Bgr, 1, 1)
command.SourcePoint = New Point(0, 0)
command.Run(leadImage)
codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)
command.SourceImage.Dispose()
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
ImageProcessing.Effects.FeatherAlphaBlendCommand public void FeatherAlphaBlendCommandExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); FeatherAlphaBlendCommand command = new FeatherAlphaBlendCommand(); command.DestinationRectangle = new Rectangle(0, 0, image.Width / 2, image.Height / 2); command.MaskImage = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image3.cmp", 24, CodecsLoadByteOrder.Bgr, 1, 1); command.SourcePoint = new Point(image.Width / 2, image.Height / 2); command.SourceImage = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image2.cmp", 24, CodecsLoadByteOrder.Bgr, 1, 1); command.Run(image); codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); //FadeRegionImage.Dispose(); command.SourceImage.Dispose(); RasterCodecs.Shutdown(); } |
Remarks
Inheritance Hierarchy
Requirements
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family
See Also