home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / gbmsrc.zip / gbmhist.h < prev    next >
C/C++ Source or Header  |  1998-06-21  |  1KB  |  50 lines

  1. /*
  2.  
  3. gbmhist.h - Interface to Histogram/Frequency-of-use method of colour reduction
  4.  
  5. This code has been changed to expose the various steps in performing a
  6. mapping to a frequency-of-use based palette. This is to allow people to write
  7. code that computes a frequency-of-use based palette from a set of bitmaps,
  8. and then map them all to this palette. This original gbm_hist function,
  9. which works on one bitmap, has been rewritten in terms of the lower-level
  10. functions for ease of compatibility.
  11.  
  12. */
  13.  
  14. #ifndef GBMHIST_H
  15. #define    GBMHIST_H
  16.  
  17. typedef void GBMHIST;
  18.  
  19. extern GBMHIST *gbm_create_hist(
  20.     byte rm, byte gm, byte bm
  21.     );
  22.  
  23. extern void gbm_delete_hist(GBMHIST *hist);
  24.  
  25. extern BOOLEAN gbm_add_to_hist(
  26.     GBMHIST *hist,    
  27.     const GBM *gbm, const byte *data24
  28.     );
  29.  
  30. extern void gbm_pal_hist(
  31.     GBMHIST *hist,
  32.     GBMRGB gbmrgb[],
  33.     int n_cols_wanted
  34.     );
  35.  
  36. extern void gbm_map_hist(
  37.     GBMHIST *hist,
  38.     const GBM *gbm, const byte *data24, byte *data8
  39.     );
  40.  
  41. extern BOOLEAN gbm_hist(
  42.     const GBM *gbm, const byte *data24,
  43.     GBMRGB gbmrgb[],
  44.     byte *data8,
  45.     int n_cols_wanted,
  46.     byte rm, byte gm, byte bm
  47.     );
  48.  
  49. #endif
  50.