Visual Basic (Declaration) | |
---|---|
Public Class RasterUserMatchTable |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public class RasterUserMatchTable |
C++/CLI | |
---|---|
public ref class RasterUserMatchTable |
This example changes the color resolution of a bitmap, using a user-defined palette and a match table for fast color matching.
Visual Basic | Copy Code |
---|---|
Public Sub RasterUserMatchTableExample() |
C# | Copy Code |
---|---|
public void RasterUserMatchTableExample() |
Use the RasterUserMatchTable class to create a predefined table to speed conversion with a user palette when using ColorResolutionCommand.
You should use the following sequense
Create a new instance of the RasterUserMatchTable class Call the RasterUserMatchTable.Create method to create the table. Call the RasterUserMatchTable.Use method to make this the current table. (Having this as a separate method allows you to save tables in files and get the one you need, without creating it again.) Run ColorResolutionCommand with ColorResolutionCommandPaletteFlags.UsePalette or ColorResolutionCommandPaletteFlags.FastMatch set in the ColorResolutionCommand.PaletteFlags property. Call the Unuse method when the table is no longer needed.
The completed table is a 32K array of integers. On a 32-bit system, it occupies 128K bytes of memory. Creation of the table is a slow, memory-intensive process that is useful only if you are using your own palette more than once. For example, you may want to create the table once, save it to a file, and ship that file with your application.
System.Object
Leadtools.ImageProcessing.RasterUserMatchTable
Target Platforms: Microsoft .NET Framework 3.0, Windows XP, Windows Server 2003 family, Windows Server 2008 family