1/*	colorspace.h	*/
2/*
3	Copyright 1999, Be Incorporated.   All Rights Reserved.
4	This file may be used under the terms of the Be Sample Code License.
5*/
6
7#if !defined(COLORSPACE_H)
8#define COLORSPACE_H
9
10
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		*/
14/*	converted data.	*/
15status_t convert_space(color_space in_space, color_space out_space,
16	unsigned char* in_data, int rowbytes, unsigned char* out_data);
17
18/*	This function expands rowbytes amount of data from in_data into		*/
19/*	RGBA32 data in out_buf, which must be big enough.					*/
20int expand_data(color_space from_space, unsigned char* in_data, int rowbytes,
21	unsigned char* out_buf);
22
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.			*/
25int collapse_data(unsigned char* in_buf, int num_bytes, color_space out_space,
26	unsigned char* out_buf);
27
28/*	Given a specific number of pixels in width in the color space space	*/
29/*	this function calculates what the row_bytes should be.				*/
30int calc_rowbytes(color_space space, int width);
31
32#endif /* COLORSPACE_H */
33