colors

extract colors from pictures
git clone git://git.2f30.org/colors
Log | Files | Refs | README | LICENSE

commit c0ecc876aa3cab6723efbf1bc55866b4eb330f55
parent 9b9bc15a79d495a140ede7fd33dfa9bb4ed149aa
Author: lostd <lostd@2f30.org>
Date:   Tue,  9 Jun 2015 20:22:55 +0300

Not brightness but greyscale steps

Diffstat:
Mcolors.1 | 2+-
Mcolors.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/colors.1 b/colors.1 @@ -13,7 +13,7 @@ .Sh DESCRIPTION .Nm is a simple tool to extract colors from pictures. By default it selects -initial clusters based on brightness +initial clusters based on greyscale steps. .Sh OPTIONS .Bl -tag -width "-n clusters" diff --git a/colors.c b/colors.c @@ -143,7 +143,7 @@ adjclusters(struct cluster *c, size_t n) } void -initcluster_brightness(struct cluster *c, int i) +initcluster_greyscale(struct cluster *c, int i) { TAILQ_INIT(&c->members); c->nmembers = 0; @@ -210,7 +210,7 @@ initcluster_hue(struct cluster *c, int i) c->center = hueselect(i); } -void (*initcluster)(struct cluster *c, int i) = initcluster_brightness; +void (*initcluster)(struct cluster *c, int i) = initcluster_greyscale; size_t initspace = 256; void