Leadtools.ImageProcessing.Core Send comments on this topic. | Back to Introduction - All Topics | Help Version 16.5.9.25
ConvertSignedToUnsignedCommand Constructor(ConvertSignedToUnsignedCommandType)
See Also  Example
Leadtools.ImageProcessing.Core Namespace > ConvertSignedToUnsignedCommand Class > ConvertSignedToUnsignedCommand Constructor : ConvertSignedToUnsignedCommand Constructor(ConvertSignedToUnsignedCommandType)



type
Flag that indicates how the shift will be done.
Initializes a new ConvertSignedToUnsignedCommand class object with explicit parameters.

Syntax

Visual Basic (Declaration) 
Public Function New( _
   ByVal type As ConvertSignedToUnsignedCommandType _
)
Visual Basic (Usage)Copy Code
Dim type As ConvertSignedToUnsignedCommandType
 
Dim instance As ConvertSignedToUnsignedCommand(type)
C# 
public ConvertSignedToUnsignedCommand( 
   ConvertSignedToUnsignedCommandType type
)
C++/CLI 
public:
ConvertSignedToUnsignedCommand( 
   ConvertSignedToUnsignedCommandType type
)

Parameters

type
Flag that indicates how the shift will be done.

Example

Run the ConvertSignedToUnsignedCommand on an image. The passed image must be signed image.

Visual BasicCopy Code
Public Sub ConvertSignedToUnsignedConstructorExample()
   RasterCodecs.Startup()
   Dim codecs As New RasterCodecs()
   codecs.ThrowExceptionsOnInvalidImages = True

   Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "IMAGE2.dic")

   ' Prepare the command
   Dim command As ConvertSignedToUnsignedCommand = New ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero)
   'convert image to unsigned.
   command.Run(leadImage)

   RasterCodecs.Shutdown()
End Sub
C#Copy Code
public void ConvertSignedToUnsignedConstructorExample() 

   // Load an image 
   RasterCodecs.Startup(); 
   RasterCodecs codecs = new RasterCodecs(); 
   codecs.ThrowExceptionsOnInvalidImages = true; 
 
   RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "IMAGE2.dic"); 
 
   // Prepare the command 
   ConvertSignedToUnsignedCommand command = new ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero); 
   // convert image to unsigned. 
   command.Run(image); 
 
   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