3 Copyright 1999, Be Incorporated. All Rights Reserved.
4 This file may be used under the terms of the Be Sample Code License.
7 #if !defined(COLORSPACE_H)
11 /* This is the main conversion function; it converts data in in_data */
12 /* with rowbytes amount of pixel data into some other color space in */
13 /* out_data, with enough memory assumed to be in out_data for the */
15 status_t
convert_space(color_space in_space
, color_space out_space
,
16 unsigned char * in_data
, int rowbytes
, unsigned char * out_data
);
18 /* This function expands rowbytes amount of data from in_data into */
19 /* RGBA32 data in out_buf, which must be big enough. */
20 int expand_data(color_space from_space
, unsigned char * in_data
,
21 int rowbytes
, unsigned char * out_buf
);
23 /* This function converts num_bytes bytes of RGBA32 data into some new */
24 /* color space in out_buf, where out_buf must be big enough. */
25 int collapse_data(unsigned char * in_buf
, int num_bytes
,
26 color_space out_space
, unsigned char * out_buf
);
28 /* Given a specific number of pixels in width in the color space space */
29 /* this function calculates what the row_bytes should be. */
30 int calc_rowbytes(color_space space
, int width
);
32 #endif /* COLORSPACE_H */