Leadtools.Windows.Media.Effects Send comments on this topic. | Back to Introduction - All Topics | Help Version 15.02.15
RemapIntensityCommandBitmapEffect Class
See Also  Members   Example 
Leadtools.Windows.Media.Effects.Color Namespace : RemapIntensityCommandBitmapEffect Class





Uses a lookup table to change an image's intensity values. You can apply the change to red, green, blue, or all color channels.

Syntax

Visual Basic (Declaration) 
Public Class RemapIntensityCommandBitmapEffect 
   Inherits RasterCommandBitmapEffect
Visual Basic (Usage)Copy Code
Dim instance As RemapIntensityCommandBitmapEffect
C# 
public class RemapIntensityCommandBitmapEffect : RasterCommandBitmapEffect 
Managed Extensions for C++ 
public __gc class RemapIntensityCommandBitmapEffect : public RasterCommandBitmapEffect 
C++/CLI 
public ref class RemapIntensityCommandBitmapEffect : public RasterCommandBitmapEffect 
XAML Property Element Usage 

RemapIntensityCommandBitmapEffect ...

Example

Run the RemapIntensityCommandBitmapEffect on an image.

Visual BasicCopy Code
Public Sub RemapIntensityCommandBitmapEffectExample(ByVal element As FrameworkElement)
   Dim effect As RemapIntensityCommandBitmapEffect = New RemapIntensityCommandBitmapEffect()
   Dim LookupTable As Integer() = New Integer(255) {} ' Array to hold lookup table.

   'Get Lookup table where the array calculated by the linear function for all the items of the array is from 0 - 255.
   Dim value As Integer = 0
   For i As Integer = 255 To 0 Step -1
      LookupTable(i) = value
      value = value + 1
   Next i
   effect.Flags = RemapIntensityCommandBitmapEffectsFlags.Master
   effect.LookupTable = LookupTable
   element.BitmapEffect = effect
End Sub
C#Copy Code
public void RemapIntensityCommandBitmapEffectExample(FrameworkElement element) 

   RemapIntensityCommandBitmapEffect effect = new RemapIntensityCommandBitmapEffect(); 
   int[] LookupTable = new int[256];// Array to hold lookup table.  
 
   int value = 0; 
   for (int i = 255; i >= 0; i--, value++) 
      LookupTable[i] = value; 
 
   effect.Flags = RemapIntensityCommandBitmapEffectsFlags.Master; 
   effect.LookupTable = LookupTable; 
 
   element.BitmapEffect = effect; 
}
XAMLCopy Code
<!-- Not implemented.  Requires lookup table. -->

Remarks

  • This command supports signed data images.
  • The image intensity level range depends on the resolution of the image. For 64-bit, 48-bit, and 16-bit images, the intensity levels range from 0 to 2^16-1. For 12-bit images, the intensity levels range from 0 to 2^12-1. For other resolutions, the intensity levels range from 0 to 255.
  • Be sure that LookupTable property contains the number of the image intensity levels. For example if the image is 16-bit (the maximum image intensity level is 2^16 - 1).
  • This command supports signed data images.
  • This command does not support 32-bit grayscale images.

Inheritance Hierarchy

System.Object
   System.Windows.Threading.DispatcherObject
      System.Windows.DependencyObject
         System.Windows.Freezable
            System.Windows.Media.Animation.Animatable
               System.Windows.Media.Effects.BitmapEffect
                  Leadtools.Windows.Media.Effects.RasterCommandBitmapEffect
                     Leadtools.Windows.Media.Effects.Color.RemapIntensityCommandBitmapEffect

Requirements

Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Vista, and Windows Server 2003

See Also