home *** CD-ROM | disk | FTP | other *** search
- /* map16bpp.h
- * AUTHOR: Cy Booker, cy@cheepnis.demon.co.uk
- * LICENSE: FreeWare, Copyright (c) 1995 Cy Booker
- * PURPOSE: low level 16 bit colour routines
- */
-
- #ifndef map16bpp_h
- #define map16bpp_h
-
-
-
- #include "OS:os.h"
-
- #include "gif2rpc:process_gif.h"
-
-
-
- /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- *
- * input: each intensity is nominally 16-bit value, but is first forced into range [0, 0xffff]
- * returns: 16bpp colour number (%0bbb bbgg gggr rrrr)
- * output: error in approximating colour, as a 16-bit scaled, ie (in_clipped - out*0xffff/0x1f)
- *
- * note that this will find the closest colour by examining the nine voxels around the
- * (apparently) nearest one. It then calculates the error (scaled euclidean distance) for
- * each voxel, and returns the colour that minimises this distance measure
- *
- */
-
- extern bits map_scaled_rgb_to_16bpp_colour_accurate(
- rgbtupleout *out,
- int red,
- int grn,
- int blu);
-
-
-
- /* ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- *
- * input: each intensity is nominally 16-bit value, but is first forced into range [0, 0xffff]
- * returns: 16bpp colour number (%0bbb bbgg gggr rrrr)
- * output: error in approximating colour, as a 16-bit scaled, ie (in_clipped - out*0xffff/0x1f)
- *
- */
-
- extern bits map_scaled_rgb_to_16bpp_colour_quick(
- rgbtupleout *out,
- int red,
- int green,
- int blue);
-
-
-
- #endif /* map16bpp_h */
-