summaryrefslogtreecommitdiff
path: root/Embiance.h
blob: 6bfd4eb62cc71d03cee9892a2c759cffb6f24dc3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef __EMBIANCE_H__
#define __EMBIANCE_H__

#include <leptonica/allheaders.h>
#include <evas-1/Evas.h>

#include <stdio.h>

/**
 * Extracts the @param ncolors most often used colors in a given image object @param obj.
 * @param obj The Evas Image Object to get the ambient colors for
 * @param ncolors The number used colors to extract
 * @param sigbits Number of significant bits. Think of 'precision' here. (Automatically limited if necessary) Valid values: 1-6
 * @param r pointer to an array of @param ncolors elements to hold the red values
 * @param g pointer to an array of @param ncolors elements to hold the green values
 * @param b pointer to an array of @param ncolors elements to hold the blue values
 * @return returns the number of different colors that were extracted.
 */
unsigned int evas_object_image_frequent_colors_get_histo(Evas_Object *obj, unsigned int ncolors, unsigned int sigbits, l_int32 **rr, l_int32 **rg, l_int32 **rb);

/**
 * Extracts the @param ncolors most often used colors in a given image object @param obj.
 * @param obj The Evas Image Object to get the ambient colors for
 * @param ncolors The number used colors to extract
 * @param r pointer to an array of @param ncolors elements to hold the red values
 * @param g pointer to an array of @param ncolors elements to hold the green values
 * @param b pointer to an array of @param ncolors elements to hold the blue values
 * @return returns the number of different colors that were extracted.
 */
unsigned int evas_object_image_frequent_colors_get_median_cut(Evas_Object *obj, unsigned int ncolors, l_int32 **r, l_int32 **g, l_int32 **b);
#endif