Initializes a new ConvertSignedToUnsignedCommand class object with explicit parameters.
Syntax
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 Basic | Copy 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")
Dim command As ConvertSignedToUnsignedCommand = New ConvertSignedToUnsignedCommand(ConvertSignedToUnsignedCommandType.ShiftNegativeToZero)
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