Remapping an image to a colour map

Remapping an image to a colour map

Post by Neil Willia » Mon, 26 Jul 1999 04:00:00


I'm trying to write some code to display an IFF-ILBM picture in a window on
Workbench, which is fairly easy to do.  The problem I have is that I can't
think how to remap the colours to Workbench's - the only ideas I have involve
putting each pixel out with WritePixelArray8() after remapping each
individually with ObtainBestPen().  I just want to dump the image data out
with Blt..BitMap() and not spend all my project time on remapping :-)

Does any have a C or E code fragment which just displays an image in a window
on Workbench?

BTW, no Datatypes or MUI.  That's too easy.

--

 SlamMail & Zeus BBS Developer/TKG SysOp/RC5 Amiga Team/AIO News Editor
 Zeus Developments - http://www.bleach.demon.co.uk/zeus/

 
 
 

1. Color mapping an image based on existing screen palette?

I am wondering how to accomplish the following:

I have, let's say, a 16 color image with a particular color map that I
would like to have my program display in a window.  In the past, I included
the image in my code, and DrawImage() this thing into a RastPort.  This is
fine on a custom screen, but can result in serious ugliness when I have no
control over the (public) screen's palette.

Under KS3.x there seems to be a way to remap the image colors to those of
the screen in such a way that the image is drawn in as close to the
original colors as possible.  Am I making sense?

It seems that MultiView and the WBPattern for the WB backdrop (both, I
presume, using Datatypes) make use of some method for mapping the current
screen colors to the closest equivalents in the image that they're trying
to display.  In addition, they seem to be able to do dithering, too, to
overcome lack of colors close enough to the original or whatever.

I'd love to know how this is done!  Anyone willing to help me out?  I use
SAS/C 6.51 and have V40 includes and the V36/V37 printed RKRMs.  Any hints
for source code I should look at are also welcome.

MANY (yes, MANY!) thanks in advance!

 ._.  Udo Schuermann

2. Fonts?

3. Image dithering & remapping

4. how can I use datetime picker control in asp.net application with c#

5. Image Remapping Help Wanted

6. Problem connecting or Ping PIX from outside

7. Datatypes/image remapping

8. Problem with Layers

9. Image Remapping

10. Color remapping

11. Remapping a bitmap's colours

12. Color remapping

13. Remapping colours.