Leadtools.ImageProcessing.Effects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
FeatherAlphaBlendCommand Constructor(RasterImage,Point,Rectangle,RasterImage)
See Also  Example
Leadtools.ImageProcessing.Effects Namespace > FeatherAlphaBlendCommand Class > FeatherAlphaBlendCommand Constructor : FeatherAlphaBlendCommand Constructor(RasterImage,Point,Rectangle,RasterImage)




sourceImage
RasterImage object that references the source image.
sourcePoint
Point structure that contains the origin of the source rectangle. The width and height are the same width and height for the destination rectangle.
destinationRectangle
Rectangle structure that contains the destination rectangle.
maskImage
RasterImage object that references the fade mask. If you want to combine the two images just with opacity set this property to null.
Initializes a new FeatherAlphaBlendCommand class object with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal sourceImage As RasterImage, _
   ByVal sourcePoint As Point, _
   ByVal destinationRectangle As Rectangle, _
   ByVal maskImage As RasterImage _
)
Visual Basic (Usage)Copy Code
Dim sourceImage As RasterImage
Dim sourcePoint As Point
Dim destinationRectangle As Rectangle
Dim maskImage As RasterImage
 
Dim instance As FeatherAlphaBlendCommand(sourceImage, sourcePoint, destinationRectangle, maskImage)
C# 
public FeatherAlphaBlendCommand( 
   RasterImage sourceImage,
   Point sourcePoint,
   Rectangle destinationRectangle,
   RasterImage maskImage
)
Managed Extensions for C++ 
public: FeatherAlphaBlendCommand( 
   RasterImage sourceImage,
   Point sourcePoint,
   Rectangle destinationRectangle,
   RasterImage maskImage
)
C++/CLI 
public:
FeatherAlphaBlendCommand( 
   RasterImage sourceImage,
   Point sourcePoint,
   Rectangle destinationRectangle,
   RasterImage maskImage
)

Parameters

sourceImage
RasterImage object that references the source image.
sourcePoint
Point structure that contains the origin of the source rectangle. The width and height are the same width and height for the destination rectangle.
destinationRectangle
Rectangle structure that contains the destination rectangle.
maskImage
RasterImage object that references the fade mask. If you want to combine the two images just with opacity set this property to null.

Example

Visual BasicCopy Code
ImageProcessing.Effects.FeatherAlphaBlendCommand.FeatherAlphaBlendConstructor_S1
   Public Sub FeatherAlphaBlendConstructorExample_S1()
      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")

      ' Prepare the command
      Try
         Dim maskImage As RasterImage
         ' Loading the maskimage.
         maskImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image3.cmp", 24, CodecsLoadByteOrder.Bgr, 1, 1)
         Dim command As FeatherAlphaBlendCommand = New FeatherAlphaBlendCommand(leadImage, New Point(leadImage.Width \ 2, leadImage.Height \ 2), New Rectangle(0, 0, leadImage.Width \ 2, leadImage.Height \ 2), maskImage)
         command.Run(leadImage)
         codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)
      Catch ex As Exception
         MessageBox.Show(ex.Message)
      End Try

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Effects.FeatherAlphaBlendCommand.FeatherAlphaBlendConstructor_S1 
      public void FeatherAlphaBlendConstructorExample_S1() 
      { 
         // 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"); 
 
         // Prepare the command 
         try 
         { 
            RasterImage maskImage; 
            // Loading the maskimage. 
            maskImage = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Image3.cmp", 24, CodecsLoadByteOrder.Bgr, 1, 1); 
            FeatherAlphaBlendCommand command = new FeatherAlphaBlendCommand(image,new Point(image.Width / 2, image.Height / 2),new Rectangle(0, 0, image.Width / 2, image.Height / 2),maskImage); 
            command.Run(image); 
            codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); 
         }     
         catch(Exception exception) 
         { 
            MessageBox.Show(exception.Message); 
         } 
 
         RasterCodecs.Shutdown(); 
      }

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