summaryrefslogtreecommitdiffstats
path: root/px.c
blob: 2c20418daef39f808f73d6986136588ee327805d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include <stdio.h>
#include <wand/wand_api.h>

int main(int argc, char *argv[])
{
	PixelWand *pix;
	char *str;
	char *col[] = {"rgb(0,0,0)", "rgb(80,80,80)", "rgb(255,255,255)", "rgb(999,999,999)", NULL};
	int  i;

	pix = NewPixelWand();
	for (i=0 ; col[i] ; i++) 
	{
		PixelSetColor(pix, col[i]);
		str = PixelGetColorAsString(pix);
		printf("%s = rgb(%s)\n", col[i], str);
	}
	DestroyPixelWand(pix);
	return 0;
}