]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/latex/wx/quantize.tex
Documented new menu label functions
[wxWidgets.git] / docs / latex / wx / quantize.tex
... / ...
CommitLineData
1\section{\class{wxQuantize}}\label{wxquantize}
2
3Performs quantization, or colour reduction, on a wxImage.
4
5Functions in this class are static and so a wxQuantize object need not be created.
6
7\wxheading{Derived from}
8
9\helpref{wxObject}{wxobject}
10
11\wxheading{Include files}
12
13<wx/quantize.h>
14
15\wxheading{Library}
16
17\helpref{wxCore}{librarieslist}
18
19\latexignore{\rtfignore{\wxheading{Members}}}
20
21\membersection{wxQuantize::wxQuantize}\label{wxquantizewxquantize}
22
23\func{}{wxQuantize}{\void}
24
25Constructor. You do not need to construct a wxQuantize object since its functions are static.
26
27\membersection{wxQuantize::Quantize}\label{wxquantizequantize}
28
29\func{bool}{Quantize}{\param{const wxImage\& }{src}, \param{wxImage\& }{dest}, \param{wxPalette** }{pPalette}, \param{int }{desiredNoColours = 236}, \param{unsigned char** }{eightBitData = 0}, \param{int }{flags = wxQUANTIZE\_INCLUDE\_WINDOWS\_COLOURS|wxQUANTIZE\_FILL\_DESTINATION\_IMAGE|wxQUANTIZE\_RETURN\_8BIT\_DATA}}
30
31Reduce the colours in the source image and put the result into the
32destination image. Both images may be the same, to overwrite the source image.
33Specify an optional palette pointer to receive the resulting palette.
34This palette may be passed to ConvertImageToBitmap, for example.
35
36If you pass a palette pointer, you must free the palette yourself.
37
38\func{bool}{Quantize}{\param{const wxImage\& }{src}, \param{wxImage\& }{dest}, \param{int }{desiredNoColours = 236}, \param{unsigned char** }{eightBitData = 0}, \param{int }{flags = wxQUANTIZE\_INCLUDE\_WINDOWS\_COLOURS|wxQUANTIZE\_FILL\_DESTINATION\_IMAGE|wxQUANTIZE\_RETURN\_8BIT\_DATA}}
39
40This version sets a palette in the destination image so you don't
41have to manage it yourself.
42
43\membersection{wxQuantize::DoQuantize}\label{wxquantizedoquantize}
44
45\func{void}{DoQuantize}{\param{unsigned }{w}, \param{unsigned }{h}, \param{unsigned char** }{in\_rows}, \param{unsigned char** }{out\_rows}, \param{unsigned char* }{palette}, \param{int }{desiredNoColours}}
46
47Converts input bitmap(s) into 8bit representation with custom palette.
48
49in\_rows and out\_rows are arrays [0..h-1] of pointer to rows
50(in\_rows contains w * 3 bytes per row, out\_rows w bytes per row).
51
52Fills out\_rows with indexes into palette (which is also stored into palette variable).
53