/* Color Enhance 0.10 --- image filter plug-in for GIMP
*
* Copyright (C) 1999 Martin Weber
* Copyright (C) 1996 Federico Mena Quintero
*
* You can contact me at martweb@gmx.net
* You can contact the original GIMP authors at gimp@xcf.berkeley.edu
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
static void
enhance_it (const guchar *src, guchar *dest, gdouble vlo, gdouble vhi)
{
gdouble h, z, v;
gint c, m, y;
gint k;
guchar map[3];
c = 255 - src[0];
m = 255 - src[1];
y = 255 - src[2];
k = c;
if (m < k) k = m;
if (y 255) c = 255;
m += k;
if (m > 255) m = 255;
y += k;
if (y > 255) y = 255;
dest[0] = 255 - c;
dest[1] = 255 - m;
dest[2] = 255 - y;
}