Leadtools Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.3.5
ClearNegativePixelsCommand Class
See Also  Members  
Leadtools.ImageProcessing Namespace : ClearNegativePixelsCommand Class




Sets all pixels with negative color values to 0.

Syntax

Visual Basic (Declaration) 
Public Class ClearNegativePixelsCommand 
   Inherits RasterCommand
   Implements IRasterCommand 
Visual Basic (Usage)Copy Code
Dim instance As ClearNegativePixelsCommand
C# 
public class ClearNegativePixelsCommand : RasterCommand, IRasterCommand  
Managed Extensions for C++ 
public __gc class ClearNegativePixelsCommand : public RasterCommand, IRasterCommand  
C++/CLI 
public ref class ClearNegativePixelsCommand : public RasterCommand, IRasterCommand  

Example

This example sets the Signed flag in the load options, loads a tif file and clears the negative pixels.

Remarks

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 Processing an Image.

Inheritance Hierarchy

System.Object
   Leadtools.ImageProcessing.RasterCommand
      Leadtools.ImageProcessing.ClearNegativePixelsCommand

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