
{"id":18593,"date":"2010-12-15T21:07:49","date_gmt":"2010-12-15T15:37:49","guid":{"rendered":"http:\/\/www.froisa.com\/?p=4121"},"modified":"2010-12-15T21:07:49","modified_gmt":"2010-12-15T15:37:49","slug":"gimp-selected-color-enhancement-2","status":"publish","type":"post","link":"https:\/\/www.trueangle.org\/index.php\/2010\/12\/15\/gimp-selected-color-enhancement-2\/","title":{"rendered":"Code relating to GIMP &#8211; selected color enhancement"},"content":{"rendered":"<pre>\n\/* Color Enhance 0.10 --- image filter plug-in for GIMP\n *\n * Copyright (C) 1999 Martin Weber\n * Copyright (C) 1996 Federico Mena Quintero\n *\n * You can contact me at martweb@gmx.net\n * You can contact the original GIMP authors at gimp@xcf.berkeley.edu\n *\n * This program is free software; you can redistribute it and\/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation; either version 2 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program; if not, write to the Free Software\n * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.\n *\/\n\nstatic void\nenhance_it (const guchar *src, guchar *dest, gdouble vlo, gdouble vhi)\n{\n  gdouble h, z, v;\n  gint    c, m, y;\n  gint    k;\n  guchar  map[3];\n\n  c = 255 - src[0];\n  m = 255 - src[1];\n  y = 255 - src[2];\n\n  k = c;\n  if (m &lt; k) k = m;\n  if (y  255) c = 255;\n  m += k;\n  if (m &gt; 255) m = 255;\n  y += k;\n  if (y &gt; 255) y = 255;\n\n  dest[0] = 255 - c;\n  dest[1] = 255 - m;\n  dest[2] = 255 - y;\n}\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\/* Color Enhance 0.10 &#8212; 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 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.trueangle.org\/index.php\/2010\/12\/15\/gimp-selected-color-enhancement-2\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Code relating to GIMP &#8211; selected color enhancement&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[3,6],"tags":[],"_links":{"self":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18593"}],"collection":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/comments?post=18593"}],"version-history":[{"count":0,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/posts\/18593\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/media?parent=18593"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/categories?post=18593"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.trueangle.org\/index.php\/wp-json\/wp\/v2\/tags?post=18593"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}