Visual Basic (Declaration) | |
---|---|
Public Class ClearNegativePixelsCommand Inherits RasterCommand Implements IRasterCommand |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public class ClearNegativePixelsCommand : RasterCommand, IRasterCommand |
C++/CLI | |
---|---|
public ref class ClearNegativePixelsCommand : public RasterCommand, IRasterCommand |
This example sets the Signed flag in the load options, loads a tif file and clears the negative pixels.
Visual Basic | Copy Code |
---|---|
Public Sub ClearNegativePixelsCommandExample() |
C# | Copy Code |
---|---|
public void ClearNegativePixelsCommandExample() |
If CodecsLoadOptions.Signed is true when a file is loaded, the image may contain negative pixel values and LEADTOOLS will paint/process the image incorrectly. In order to use this image correctly, you must user ClearNegativePixelsCommand. If the CodecsLoadOptions.Signed property is false, all negative pixels are cleared internally, during the load process.
Since some TIFF files are saved with negative values for pixel colors, you should use ClearNegativePixelsCommand if, after loading an image, RasterImage.Signed is true. ClearNegativePixelsCommand does nothing if RasterImage.IsSigned is false.
Programming tip: use ClearNegativePixelsCommand right after loading the image from file.
For more information, refer to Introduction to Image Processing With LEADTOOLS.
System.Object
Leadtools.ImageProcessing.RasterCommand
Leadtools.ImageProcessing.ClearNegativePixelsCommand
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family