Updates the lookup table, based on a curve that passes through the specified points.
Syntax
Parameters
- lookupTable
- Lookup table array to be filled by this method.
- userPoints
- Array of Point structures that contain the points on the curve used to update the lookup table.
Return Value
return the number of entries in the lookup table array that were actually updated by this method.
Example
Visual Basic | Copy Code |
---|
ImageProcessing.Effects.EffectsUtilities.GetUserLookupTable
Public Sub GetUserLookupTableExample()
RasterCodecs.Startup()
Dim codecs As New RasterCodecs()
codecs.ThrowExceptionsOnInvalidImages = True
Dim leadImage As RasterImage = codecs.Load("C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg")
Dim LookupTable() As Integer
ReDim LookupTable(255)
Dim UserPoint() As Point
ReDim UserPoint(2)
UserPoint(0) = New Point(0, 0)
UserPoint(1) = New Point(128, 150)
UserPoint(2) = New Point(255, 255)
EffectsUtilities.GetUserLookupTable(LookupTable, UserPoint)
Dim command As RemapIntensityCommand = New RemapIntensityCommand
command.Flags = RemapIntensityCommandFlags.Master
command.LookupTable = LookupTable
command.Run(leadImage)
codecs.Save(leadImage, "C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24)
RasterCodecs.Shutdown()
End Sub |
C# | Copy Code |
---|
ImageProcessing.Effects.EffectsUtilities.GetUserLookupTable public void GetUserLookupTableExample() { // Load an image RasterCodecs.Startup(); RasterCodecs codecs = new RasterCodecs(); codecs.ThrowExceptionsOnInvalidImages = true; RasterImage image = codecs.Load(@"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Master.jpg"); // Prepare the command int[] LookupTable = new int[256]; Point[] UserPoint = new Point[3]; UserPoint[0] = new Point(0, 0); UserPoint[1] = new Point(128,150); UserPoint[2] = new Point(255,255); //Get Lookup table where the array effected by user data method. EffectsUtilities.GetUserLookupTable(LookupTable, UserPoint); RemapIntensityCommand command = new RemapIntensityCommand(); command.Flags = RemapIntensityCommandFlags.Master; command.LookupTable = LookupTable; command.Run(image); codecs.Save(image, @"C:\Program Files\LEAD Technologies\LEADTOOLS 15\Images\Result.jpg", RasterImageFormat.Jpeg, 24); RasterCodecs.Shutdown(); } |
Remarks
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