Initializes a new ConvertUnsignedToSignedCommand class object with explicit parameters.
Syntax
Parameters
- type
- Flag that indicates how to process bits outside
the low bit to high bit range.
Example
Run the ConvertUnsignedToSignedCommand on an image. The passed image must be Unsigned image.
Visual Basic | Copy Code |
---|
Public Sub ConvertUnsignedToSignedConstructorExample()
RasterCodecs.Startup()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg")
Dim command As ConvertUnsignedToSignedCommand = New ConvertUnsignedToSignedCommand(ConvertUnsignedToSignedCommandType.ProcessRangeOnly)
command.Run(leadImage)
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
public void ConvertUnsignedToSignedConstructorExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(LeadtoolsExamples.Common.ImagesPath.Path + "Master.jpg"); // Prepare the command ConvertUnsignedToSignedCommand command = new ConvertUnsignedToSignedCommand(ConvertUnsignedToSignedCommandType.ProcessRangeOnly); //convert image to signed. 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