GetSubTable
GetSubTable
Map RGB from color table to nearest match on target table CTabHandle myColors ; handle to a source color table short iTabRes ; controls the resolution of the inverse table
short targetTbl; table for which colors are being matched
GetSubTable maps colors between two or more color tables, returning the nearest matches in myColor's colorSpec.value fields, and placing the returned
indices into targetTbl.
iTabRes specifies the resolution of a temporary inverse color table.
targetTbl is the target table for which each RGB value is being matched.
maps each RGB value to its closest equivalent for each target table,
and returns these approximations in myColor's colorSpec. value
builds and then discards a temporary inverse table (which requires
memory in the application heap equivalent to twice the size of the
table, plus a fixed overhead for each inverse table resolution of 3 to
15K bytes). ITabRes controls the temporary inverse table's
resolution. The only time your application doesn't build a temporary
table is if the targetTbl is NIL. In that case, the current gDevice's
color table is used--along with its inverse table. You can pass an
explicit targetTbl parameter (other than NIL) if you want to provide
a resolution different than the current inverse table.