source: trunk/JPGPROC/source/gbmsrc/gbmhist.h@ 2

Last change on this file since 2 was 2, checked in by stevenhl, 8 years ago

Import sources from cwmm-full.zip dated 2005-03-21

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