Permalink
Browse files

beautify: add impression effect

  • Loading branch information...
1 parent d191ea7 commit d06bba0fa458b9a6e3c84e3bd9953e7089dc1df3 @hejiann committed Jul 17, 2012
Showing with 93 additions and 0 deletions.
  1. +3 −0 README
  2. +45 −0 beautify.c
  3. +45 −0 curves/impression
View
3 README
@@ -23,6 +23,9 @@ Support: #beautify on FreeNode
CHANGELOG
===================
+2012-07-17
+beautify: add impression effect
+
2012-07-16
add Makefile
add skin whitening tool
View
@@ -51,6 +51,7 @@ typedef enum
BEAUTIFY_EFFECT_INVERT,
BEAUTIFY_EFFECT_GOTHIC_STYLE,
BEAUTIFY_EFFECT_CLASSIC_HDR,
+ BEAUTIFY_EFFECT_IMPRESSION,
BEAUTIFY_EFFECT_LITTLE_FRESH,
BEAUTIFY_EFFECT_ABAO,
BEAUTIFY_EFFECT_ICE_SPIRIT,
@@ -73,6 +74,7 @@ static const BeautifyEffectType advanced_effects[] =
{
BEAUTIFY_EFFECT_GOTHIC_STYLE,
BEAUTIFY_EFFECT_CLASSIC_HDR,
+ BEAUTIFY_EFFECT_IMPRESSION,
BEAUTIFY_EFFECT_LITTLE_FRESH,
BEAUTIFY_EFFECT_ABAO,
BEAUTIFY_EFFECT_ICE_SPIRIT,
@@ -762,6 +764,9 @@ effect_icon_new (BeautifyEffectType effect)
case BEAUTIFY_EFFECT_CLASSIC_HDR:
title = "Classic HDR";
break;
+ case BEAUTIFY_EFFECT_IMPRESSION:
+ title = "Impression";
+ break;
case BEAUTIFY_EFFECT_LITTLE_FRESH:
title = "Little Fresh";
break;
@@ -953,6 +958,46 @@ do_effect (gint32 image, BeautifyEffectType effect)
gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_BLUE, 18, blue_pts);
}
break;
+ case BEAUTIFY_EFFECT_IMPRESSION:
+ {
+ guint8 red_pts[] = {
+ 0.000000 * 255, 0.113725 * 255,
+ 0.121569 * 255, 0.213975 * 255,
+ 0.247059 * 255, 0.323494 * 255,
+ 0.372549 * 255, 0.460137 * 255,
+ 0.498039 * 255, 0.621504 * 255,
+ 0.623529 * 255, 0.716847 * 255,
+ 0.749020 * 255, 0.766909 * 255,
+ 0.874510 * 255, 0.817666 * 255,
+ 1.000000 * 255, 0.862745 * 255,
+ };
+ guint8 green_pts[] = {
+ 0.000000 * 255, 0.200000 * 255,
+ 0.121569 * 255, 0.317329 * 255,
+ 0.247059 * 255, 0.407881 * 255,
+ 0.372549 * 255, 0.535429 * 255,
+ 0.498039 * 255, 0.682828 * 255,
+ 0.623529 * 255, 0.770688 * 255,
+ 0.749020 * 255, 0.813005 * 255,
+ 0.874510 * 255, 0.852891 * 255,
+ 1.000000 * 255, 0.902716 * 255,
+ };
+ guint8 blue_pts[] = {
+ 0.000000 * 255, 0.317714 * 255,
+ 0.121569 * 255, 0.364205 * 255,
+ 0.247059 * 255, 0.417294 * 255,
+ 0.372549 * 255, 0.495841 * 255,
+ 0.498039 * 255, 0.612710 * 255,
+ 0.623529 * 255, 0.719834 * 255,
+ 0.749020 * 255, 0.795937 * 255,
+ 0.874510 * 255, 0.845977 * 255,
+ 1.000000 * 255, 0.883024 * 255,
+ };
+ gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_RED, 18, red_pts);
+ gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_GREEN, 18, green_pts);
+ gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_BLUE, 18, blue_pts);
+ break;
+ }
case BEAUTIFY_EFFECT_LITTLE_FRESH:
{
guint8 red_pts[] = {
View
@@ -0,0 +1,45 @@
+# GIMP curves tool settings
+
+(time 0)
+(time 0)
+(channel value)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 1.000000 1.000000)
+ (n-samples 256)
+ (samples 256 0.000000 0.003922 0.007843 0.011765 0.015686 0.019608 0.023529 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.050980 0.054902 0.058824 0.062745 0.066667 0.070588 0.074510 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.101961 0.105882 0.109804 0.113725 0.117647 0.121569 0.125490 0.129412 0.133333 0.137255 0.141176 0.145098 0.149020 0.152941 0.156863 0.160784 0.164706 0.168627 0.172549 0.176471 0.180392 0.184314 0.188235 0.192157 0.196078 0.200000 0.203922 0.207843 0.211765 0.215686 0.219608 0.223529 0.227451 0.231373 0.235294 0.239216 0.243137 0.247059 0.250980 0.254902 0.258824 0.262745 0.266667 0.270588 0.274510 0.278431 0.282353 0.286275 0.290196 0.294118 0.298039 0.301961 0.305882 0.309804 0.313725 0.317647 0.321569 0.325490 0.329412 0.333333 0.337255 0.341176 0.345098 0.349020 0.352941 0.356863 0.360784 0.364706 0.368627 0.372549 0.376471 0.380392 0.384314 0.388235 0.392157 0.396078 0.400000 0.403922 0.407843 0.411765 0.415686 0.419608 0.423529 0.427451 0.431373 0.435294 0.439216 0.443137 0.447059 0.450980 0.454902 0.458824 0.462745 0.466667 0.470588 0.474510 0.478431 0.482353 0.486275 0.490196 0.494118 0.498039 0.501961 0.505882 0.509804 0.513725 0.517647 0.521569 0.525490 0.529412 0.533333 0.537255 0.541176 0.545098 0.549020 0.552941 0.556863 0.560784 0.564706 0.568627 0.572549 0.576471 0.580392 0.584314 0.588235 0.592157 0.596078 0.600000 0.603922 0.607843 0.611765 0.615686 0.619608 0.623529 0.627451 0.631373 0.635294 0.639216 0.643137 0.647059 0.650980 0.654902 0.658824 0.662745 0.666667 0.670588 0.674510 0.678431 0.682353 0.686275 0.690196 0.694118 0.698039 0.701961 0.705882 0.709804 0.713725 0.717647 0.721569 0.725490 0.729412 0.733333 0.737255 0.741176 0.745098 0.749020 0.752941 0.756863 0.760784 0.764706 0.768627 0.772549 0.776471 0.780392 0.784314 0.788235 0.792157 0.796078 0.800000 0.803922 0.807843 0.811765 0.815686 0.819608 0.823529 0.827451 0.831373 0.835294 0.839216 0.843137 0.847059 0.850980 0.854902 0.858824 0.862745 0.866667 0.870588 0.874510 0.878431 0.882353 0.886275 0.890196 0.894118 0.898039 0.901961 0.905882 0.909804 0.913725 0.917647 0.921569 0.925490 0.929412 0.933333 0.937255 0.941176 0.945098 0.949020 0.952941 0.956863 0.960784 0.964706 0.968627 0.972549 0.976471 0.980392 0.984314 0.988235 0.992157 0.996078 1.000000))
+(time 0)
+(channel red)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.113725 -1.000000 -1.000000 0.121569 0.213975 -1.000000 -1.000000 0.247059 0.323494 -1.000000 -1.000000 0.372549 0.460137 -1.000000 -1.000000 0.498039 0.621504 -1.000000 -1.000000 0.623529 0.716847 -1.000000 -1.000000 0.749020 0.766909 -1.000000 -1.000000 0.874510 0.817666 -1.000000 -1.000000 1.000000 0.862745)
+ (n-samples 256)
+ (samples 256 0.113725 0.116911 0.120097 0.123284 0.126472 0.129661 0.132852 0.136044 0.139238 0.142435 0.145635 0.148837 0.152043 0.155252 0.158465 0.161683 0.164905 0.168131 0.171363 0.174600 0.177843 0.181092 0.184347 0.187609 0.190877 0.194153 0.197436 0.200727 0.204026 0.207334 0.210650 0.213975 0.217298 0.220607 0.223906 0.227195 0.230478 0.233755 0.237029 0.240301 0.243575 0.246851 0.250131 0.253418 0.256713 0.260018 0.263336 0.266668 0.270016 0.273382 0.276769 0.280177 0.283609 0.287067 0.290552 0.294068 0.297615 0.301196 0.304812 0.308466 0.312159 0.315893 0.319671 0.323494 0.327355 0.331244 0.335162 0.339107 0.343081 0.347083 0.351112 0.355168 0.359252 0.363362 0.367499 0.371662 0.375852 0.380067 0.384308 0.388575 0.392867 0.397184 0.401526 0.405893 0.410284 0.414700 0.419139 0.423602 0.428089 0.432599 0.437132 0.441688 0.446267 0.450868 0.455492 0.460137 0.464848 0.469664 0.474576 0.479576 0.484656 0.489806 0.495020 0.500288 0.505602 0.510955 0.516337 0.521740 0.527157 0.532578 0.537996 0.543402 0.548787 0.554145 0.559465 0.564741 0.569963 0.575123 0.580213 0.585225 0.590150 0.594981 0.599708 0.604323 0.608819 0.613187 0.617418 0.621504 0.625473 0.629359 0.633165 0.636891 0.640540 0.644114 0.647614 0.651043 0.654403 0.657695 0.660921 0.664083 0.667184 0.670224 0.673206 0.676132 0.679004 0.681823 0.684591 0.687311 0.689984 0.692613 0.695198 0.697743 0.700248 0.702716 0.705148 0.707547 0.709915 0.712253 0.714563 0.716847 0.719075 0.721218 0.723281 0.725267 0.727180 0.729026 0.730808 0.732530 0.734197 0.735812 0.737381 0.738906 0.740393 0.741846 0.743268 0.744665 0.746039 0.747396 0.748740 0.750075 0.751404 0.752733 0.754066 0.755406 0.756758 0.758126 0.759515 0.760928 0.762369 0.763844 0.765356 0.766909 0.768488 0.770073 0.771663 0.773259 0.774860 0.776464 0.778072 0.779682 0.781295 0.782910 0.784525 0.786141 0.787757 0.789373 0.790987 0.792599 0.794209 0.795815 0.797419 0.799017 0.800612 0.802200 0.803783 0.805360 0.806929 0.808491 0.810044 0.811588 0.813123 0.814648 0.816163 0.817666 0.819159 0.820645 0.822122 0.823592 0.825055 0.826510 0.827959 0.829402 0.830838 0.832268 0.833692 0.835111 0.836525 0.837934 0.839338 0.840738 0.842133 0.843525 0.844913 0.846298 0.847679 0.849058 0.850434 0.851808 0.853180 0.854549 0.855918 0.857285 0.858651 0.860016 0.861381 0.862745))
+(time 0)
+(channel green)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.200000 -1.000000 -1.000000 0.121569 0.317329 -1.000000 -1.000000 0.247059 0.407881 -1.000000 -1.000000 0.372549 0.535429 -1.000000 -1.000000 0.498039 0.682828 -1.000000 -1.000000 0.623529 0.770688 -1.000000 -1.000000 0.749020 0.813005 -1.000000 -1.000000 0.874510 0.852891 -1.000000 -1.000000 1.000000 0.902716)
+ (n-samples 256)
+ (samples 256 0.200000 0.204027 0.208053 0.212075 0.216093 0.220105 0.224110 0.228105 0.232090 0.236062 0.240021 0.243965 0.247892 0.251801 0.255690 0.259559 0.263404 0.267225 0.271021 0.274789 0.278528 0.282237 0.285914 0.289558 0.293168 0.296740 0.300275 0.303771 0.307225 0.310638 0.314006 0.317329 0.320582 0.323747 0.326829 0.329834 0.332770 0.335641 0.338454 0.341215 0.343930 0.346606 0.349248 0.351863 0.354457 0.357036 0.359605 0.362173 0.364743 0.367323 0.369919 0.372536 0.375181 0.377861 0.380581 0.383347 0.386165 0.389042 0.391984 0.394997 0.398087 0.401260 0.404523 0.407881 0.411315 0.414800 0.418335 0.421918 0.425548 0.429223 0.432941 0.436701 0.440502 0.444341 0.448217 0.452129 0.456075 0.460054 0.464063 0.468102 0.472169 0.476261 0.480378 0.484519 0.488681 0.492862 0.497062 0.501279 0.505511 0.509757 0.514014 0.518283 0.522560 0.526844 0.531135 0.535429 0.539772 0.544205 0.548721 0.553311 0.557969 0.562688 0.567460 0.572278 0.577135 0.582024 0.586937 0.591866 0.596805 0.601747 0.606684 0.611609 0.616514 0.621393 0.626238 0.631042 0.635797 0.640497 0.645133 0.649699 0.654188 0.658592 0.662904 0.667116 0.671222 0.675215 0.679085 0.682828 0.686468 0.690038 0.693538 0.696971 0.700337 0.703637 0.706873 0.710047 0.713159 0.716210 0.719203 0.722138 0.725016 0.727839 0.730609 0.733326 0.735991 0.738607 0.741173 0.743693 0.746166 0.748594 0.750978 0.753321 0.755622 0.757883 0.760106 0.762292 0.764442 0.766557 0.768638 0.770688 0.772679 0.774588 0.776418 0.778174 0.779858 0.781476 0.783031 0.784526 0.785967 0.787357 0.788700 0.789999 0.791260 0.792485 0.793679 0.794845 0.795988 0.797111 0.798219 0.799316 0.800404 0.801489 0.802575 0.803664 0.804762 0.805871 0.806997 0.808143 0.809313 0.810510 0.811740 0.813005 0.814282 0.815546 0.816798 0.818039 0.819270 0.820492 0.821707 0.822914 0.824117 0.825315 0.826510 0.827704 0.828896 0.830088 0.831282 0.832479 0.833679 0.834884 0.836095 0.837313 0.838539 0.839774 0.841020 0.842278 0.843548 0.844832 0.846131 0.847446 0.848779 0.850130 0.851500 0.852891 0.854300 0.855723 0.857160 0.858610 0.860072 0.861547 0.863034 0.864532 0.866041 0.867560 0.869090 0.870629 0.872177 0.873734 0.875299 0.876872 0.878452 0.880039 0.881632 0.883231 0.884835 0.886445 0.888059 0.889677 0.891299 0.892924 0.894552 0.896182 0.897814 0.899447 0.901081 0.902716))
+(time 0)
+(channel blue)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.317714 -1.000000 -1.000000 0.121569 0.364205 -1.000000 -1.000000 0.247059 0.417294 -1.000000 -1.000000 0.372549 0.495841 -1.000000 -1.000000 0.498039 0.612710 -1.000000 -1.000000 0.623529 0.719834 -1.000000 -1.000000 0.749020 0.795937 -1.000000 -1.000000 0.874510 0.845977 -1.000000 -1.000000 1.000000 0.883024)
+ (n-samples 256)
+ (samples 256 0.317714 0.319173 0.320633 0.322093 0.323554 0.325015 0.326479 0.327943 0.329410 0.330878 0.332349 0.333822 0.335298 0.336777 0.338259 0.339745 0.341234 0.342728 0.344226 0.345728 0.347236 0.348748 0.350266 0.351789 0.353318 0.354853 0.356394 0.357942 0.359497 0.361059 0.362628 0.364205 0.365778 0.367339 0.368888 0.370427 0.371959 0.373485 0.375007 0.376528 0.378048 0.379570 0.381096 0.382627 0.384166 0.385714 0.387273 0.388845 0.390432 0.392035 0.393658 0.395301 0.396966 0.398655 0.400371 0.402114 0.403887 0.405693 0.407531 0.409405 0.411317 0.413268 0.415259 0.417294 0.419357 0.421434 0.423525 0.425632 0.427756 0.429899 0.432060 0.434243 0.436447 0.438673 0.440924 0.443200 0.445503 0.447833 0.450192 0.452581 0.455001 0.457454 0.459940 0.462460 0.465017 0.467610 0.470242 0.472913 0.475625 0.478378 0.481174 0.484015 0.486901 0.489833 0.492812 0.495841 0.498936 0.502111 0.505361 0.508682 0.512071 0.515521 0.519030 0.522592 0.526203 0.529860 0.533556 0.537288 0.541052 0.544843 0.548657 0.552489 0.556336 0.560191 0.564052 0.567914 0.571772 0.575622 0.579459 0.583280 0.587079 0.590853 0.594597 0.598306 0.601976 0.605603 0.609183 0.612710 0.616215 0.619730 0.623252 0.626779 0.630310 0.633842 0.637374 0.640903 0.644428 0.647947 0.651458 0.654958 0.658447 0.661921 0.665380 0.668820 0.672240 0.675639 0.679014 0.682363 0.685684 0.688976 0.692236 0.695463 0.698654 0.701807 0.704922 0.707995 0.711024 0.714009 0.716946 0.719834 0.722679 0.725490 0.728267 0.731009 0.733719 0.736395 0.739040 0.741652 0.744232 0.746782 0.749301 0.751790 0.754249 0.756679 0.759080 0.761453 0.763798 0.766116 0.768406 0.770671 0.772909 0.775121 0.777308 0.779471 0.781609 0.783724 0.785815 0.787883 0.789929 0.791953 0.793956 0.795937 0.797889 0.799804 0.801683 0.803528 0.805339 0.807118 0.808866 0.810584 0.812274 0.813935 0.815571 0.817182 0.818769 0.820333 0.821876 0.823398 0.824901 0.826387 0.827856 0.829309 0.830748 0.832174 0.833588 0.834991 0.836385 0.837771 0.839149 0.840522 0.841890 0.843254 0.844616 0.845977 0.847328 0.848661 0.849976 0.851274 0.852555 0.853820 0.855070 0.856305 0.857525 0.858732 0.859926 0.861107 0.862276 0.863434 0.864581 0.865719 0.866846 0.867965 0.869075 0.870178 0.871274 0.872363 0.873446 0.874524 0.875597 0.876665 0.877731 0.878793 0.879853 0.880911 0.881968 0.883024))
+(time 0)
+(channel alpha)
+(curve
+ (curve-type free)
+ (n-points 17)
+ (points 34 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000)
+ (n-samples 256)
+ (samples 256 0.000000 0.003922 0.007843 0.011765 0.015686 0.019608 0.023529 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.050980 0.054902 0.058824 0.062745 0.066667 0.070588 0.074510 0.078431 0.082353 0.086275 0.090196 0.094118 0.098039 0.101961 0.105882 0.109804 0.113725 0.117647 0.121569 0.125490 0.129412 0.133333 0.137255 0.141176 0.145098 0.149020 0.152941 0.156863 0.160784 0.164706 0.168627 0.172549 0.176471 0.180392 0.184314 0.188235 0.192157 0.196078 0.200000 0.203922 0.207843 0.211765 0.215686 0.219608 0.223529 0.227451 0.231373 0.235294 0.239216 0.243137 0.247059 0.250980 0.254902 0.258824 0.262745 0.266667 0.270588 0.274510 0.278431 0.282353 0.286275 0.290196 0.294118 0.298039 0.301961 0.305882 0.309804 0.313725 0.317647 0.321569 0.325490 0.329412 0.333333 0.337255 0.341176 0.345098 0.349020 0.352941 0.356863 0.360784 0.364706 0.368627 0.372549 0.376471 0.380392 0.384314 0.388235 0.392157 0.396078 0.400000 0.403922 0.407843 0.411765 0.415686 0.419608 0.423529 0.427451 0.431373 0.435294 0.439216 0.443137 0.447059 0.450980 0.454902 0.458824 0.462745 0.466667 0.470588 0.474510 0.478431 0.482353 0.486275 0.490196 0.494118 0.498039 0.501961 0.505882 0.509804 0.513725 0.517647 0.521569 0.525490 0.529412 0.533333 0.537255 0.541176 0.545098 0.549020 0.552941 0.556863 0.560784 0.564706 0.568627 0.572549 0.576471 0.580392 0.584314 0.588235 0.592157 0.596078 0.600000 0.603922 0.607843 0.611765 0.615686 0.619608 0.623529 0.627451 0.631373 0.635294 0.639216 0.643137 0.647059 0.650980 0.654902 0.658824 0.662745 0.666667 0.670588 0.674510 0.678431 0.682353 0.686275 0.690196 0.694118 0.698039 0.701961 0.705882 0.709804 0.713725 0.717647 0.721569 0.725490 0.729412 0.733333 0.737255 0.741176 0.745098 0.749020 0.752941 0.756863 0.760784 0.764706 0.768627 0.772549 0.776471 0.780392 0.784314 0.788235 0.792157 0.796078 0.800000 0.803922 0.807843 0.811765 0.815686 0.819608 0.823529 0.827451 0.831373 0.835294 0.839216 0.843137 0.847059 0.850980 0.854902 0.858824 0.862745 0.866667 0.870588 0.874510 0.878431 0.882353 0.886275 0.890196 0.894118 0.898039 0.901961 0.905882 0.909804 0.913725 0.917647 0.921569 0.925490 0.929412 0.933333 0.937255 0.941176 0.945098 0.949020 0.952941 0.956863 0.960784 0.964706 0.968627 0.972549 0.976471 0.980392 0.984314 0.988235 0.992157 0.996078 1.000000))
+
+# end of curves tool settings

0 comments on commit d06bba0

Please sign in to comment.