[?] Re-Mapping an image

BlitzMax Forums/BlitzMax Programming/[?] Re-Mapping an image

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Got it working by using:

For pal=EachIn palettelist
 r=Abs(sourceRed-palRed)
 g=Abs(sourceGreen-palGreen)
 b=Abs(sourceBlue-palBlue)
 pal.index=(r+g+b)/3
Next

After that, I sort the palettelist then pick off the first entry which is the closest match.