Leadtools.ImageProcessing.Effects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.12.10
FileName Property
See Also  Example
Leadtools.ImageProcessing.Effects Namespace > AddMessageCommand Class : FileName Property




Gets or sets a string that contains the name of the file that will be added to the image.

Syntax

Visual Basic (Declaration) 
Public Property FileName As String
Visual Basic (Usage)Copy Code
Dim instance As AddMessageCommand
Dim value As String
 
instance.FileName = value
 
value = instance.FileName
C# 
public string FileName {get; set;}
Managed Extensions for C++ 
public: __property string* get_FileName();
public: __property void set_FileName( 
   string* value
);
C++/CLI 
public:
property String^ FileName {
   String^ get();
   void set (String^ value);
}

Return Value

String that contains the name of the file that will be added to the image. When adding a message to the image this string contains the name of the file that will be added, and the message property must be set to null, otherwise this parameter has no effect.

Example

Visual BasicCopy Code
ImageProcessing.Effects.AddMessageCommand.FileName
   Public Sub FileNamePropertyExample()
      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
      Dim command As AddMessageCommand = New AddMessageCommand
      ' Assign the file name.
      command.FileName = "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Message.txt"
      ' You must set this property to null.
      command.Message = Nothing
      ' Assign the password.
      command.Password = "LEAD Technologies"
      ' The starting point.
      command.Start = New Point(0, 0)
      ' Run the commnad.
      command.Run(leadImage)
      codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)

      RasterCodecs.Shutdown()
   End Sub
C#Copy Code
ImageProcessing.Effects.AddMessageCommand.FileName 
      public void FileNamePropertyExample() 
      { 
         // 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 
         AddMessageCommand command = new AddMessageCommand(); 
         // Assign the file name. 
         command.FileName = @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Message.txt"; 
         // You must set this property to null. 
         command.Message = null; 
         // Assign the password. 
         command.Password = "LEAD Technologies"; 
         // The starting point. 
         command.Start = new Point(0,0); 
         // Run the commnad. 
         command.Run(image); 
         codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); 
 
         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