Skip to content
Browse files

skin-whitening: add the moderate flesh effect.

  • Loading branch information...
1 parent 0c37bf3 commit d2b76c6738c01b5ea0dfb531a41951f0ae1339ec @hejiann committed Jul 31, 2012
Showing with 92 additions and 1 deletion.
  1. +1 −0 README
  2. +45 −0 curves/skin-whitening/moderate-flesh
  3. +40 −0 skin-whitening-effect.c
  4. +1 −1 skin-whitening-effect.h
  5. +5 −0 skin-whitening.c
View
1 README
@@ -55,6 +55,7 @@ skin whitening: add the little pink effect.
skin whitening: add the moderate pink effect.
skin whitening: add the high pink effect.
skin whitening: add the little flesh effect.
+skin whitening: add the moderate flesh effect.
2012-07-30:
beautify: fix missing effect.
View
45 curves/skin-whitening/moderate-flesh
@@ -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 0.121569 0.121569 -1.000000 -1.000000 0.247059 0.247059 -1.000000 -1.000000 0.372549 0.372549 -1.000000 -1.000000 0.498039 0.498039 -1.000000 -1.000000 0.623529 0.623529 -1.000000 -1.000000 0.749020 0.749020 -1.000000 -1.000000 0.874510 0.874510 -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.023530 0.027451 0.031373 0.035294 0.039216 0.043137 0.047059 0.050981 0.054902 0.058824 0.062745 0.066667 0.070589 0.074510 0.078432 0.082353 0.086275 0.090196 0.094118 0.098040 0.101961 0.105883 0.109804 0.113726 0.117647 0.121569 0.125491 0.129412 0.133334 0.137255 0.141177 0.145098 0.149020 0.152942 0.156863 0.160785 0.164706 0.168628 0.172549 0.176471 0.180392 0.184314 0.188236 0.192157 0.196079 0.200000 0.203922 0.207843 0.211765 0.215687 0.219608 0.223530 0.227451 0.231373 0.235294 0.239216 0.243137 0.247059 0.250981 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.313726 0.317647 0.321569 0.325490 0.329412 0.333333 0.337255 0.341177 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.403921 0.407843 0.411765 0.415686 0.419608 0.423529 0.427451 0.431372 0.435294 0.439216 0.443137 0.447059 0.450980 0.454902 0.458823 0.462745 0.466667 0.470588 0.474510 0.478431 0.482353 0.486274 0.490196 0.494117 0.498039 0.501961 0.505882 0.509804 0.513725 0.517647 0.521568 0.525490 0.529411 0.533333 0.537255 0.541176 0.545098 0.549019 0.552941 0.556862 0.560784 0.564705 0.568627 0.572549 0.576470 0.580392 0.584313 0.588235 0.592156 0.596078 0.600000 0.603921 0.607843 0.611764 0.615686 0.619607 0.623529 0.627451 0.631372 0.635294 0.639215 0.643137 0.647059 0.650980 0.654902 0.658823 0.662745 0.666666 0.670588 0.674510 0.678431 0.682353 0.686274 0.690196 0.694118 0.698039 0.701961 0.705883 0.709804 0.713726 0.717647 0.721569 0.725490 0.729412 0.733334 0.737255 0.741177 0.745098 0.749020 0.752942 0.756863 0.760785 0.764706 0.768628 0.772549 0.776471 0.780393 0.784314 0.788236 0.792157 0.796079 0.800000 0.803922 0.807844 0.811765 0.815687 0.819608 0.823530 0.827451 0.831373 0.835294 0.839216 0.843138 0.847059 0.850981 0.854902 0.858824 0.862745 0.866667 0.870588 0.874510 0.878432 0.882353 0.886275 0.890196 0.894118 0.898039 0.901961 0.905883 0.909804 0.913726 0.917647 0.921569 0.925490 0.929412 0.933333 0.937255 0.941177 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.007843 -1.000000 -1.000000 0.121569 0.192157 -1.000000 -1.000000 0.247059 0.372549 -1.000000 -1.000000 0.372549 0.529412 -1.000000 -1.000000 0.498039 0.666667 -1.000000 -1.000000 0.623529 0.784314 -1.000000 -1.000000 0.749020 0.874510 -1.000000 -1.000000 0.874510 0.945098 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.007843 0.013867 0.019890 0.025913 0.031933 0.037952 0.043969 0.049983 0.055993 0.061999 0.068001 0.073998 0.079989 0.085975 0.091954 0.097927 0.103892 0.109849 0.115798 0.121739 0.127670 0.133591 0.139502 0.145402 0.151291 0.157168 0.163033 0.168885 0.174724 0.180549 0.186361 0.192157 0.197948 0.203741 0.209536 0.215332 0.221126 0.226918 0.232706 0.238489 0.244267 0.250037 0.255798 0.261549 0.267289 0.273017 0.278731 0.284430 0.290113 0.295779 0.301425 0.307052 0.312657 0.318240 0.323799 0.329333 0.334840 0.340320 0.345771 0.351192 0.356582 0.361939 0.367261 0.372549 0.377805 0.383035 0.388239 0.393417 0.398569 0.403697 0.408800 0.413879 0.418933 0.423965 0.428973 0.433958 0.438920 0.443861 0.448779 0.453677 0.458553 0.463408 0.468243 0.473058 0.477854 0.482630 0.487388 0.492126 0.496847 0.501550 0.506235 0.510903 0.515555 0.520190 0.524809 0.529412 0.533998 0.538565 0.543113 0.547641 0.552151 0.556641 0.561112 0.565564 0.569997 0.574411 0.578805 0.583180 0.587537 0.591874 0.596192 0.600491 0.604770 0.609031 0.613272 0.617494 0.621697 0.625881 0.630046 0.634192 0.638318 0.642425 0.646513 0.650582 0.654632 0.658663 0.662675 0.666667 0.670644 0.674609 0.678561 0.682499 0.686423 0.690331 0.694224 0.698101 0.701960 0.705801 0.709624 0.713427 0.717210 0.720972 0.724713 0.728432 0.732127 0.735799 0.739446 0.743069 0.746665 0.750235 0.753777 0.757292 0.760778 0.764234 0.767660 0.771056 0.774419 0.777751 0.781049 0.784314 0.787544 0.790741 0.793905 0.797036 0.800136 0.803205 0.806243 0.809253 0.812233 0.815186 0.818111 0.821010 0.823883 0.826730 0.829554 0.832353 0.835130 0.837884 0.840617 0.843329 0.846021 0.848693 0.851347 0.853983 0.856602 0.859204 0.861790 0.864361 0.866918 0.869462 0.871992 0.874510 0.877013 0.879496 0.881961 0.884406 0.886832 0.889239 0.891627 0.893995 0.896345 0.898675 0.900986 0.903278 0.905551 0.907805 0.910040 0.912255 0.914451 0.916628 0.918786 0.920925 0.923045 0.925146 0.927227 0.929289 0.931332 0.933356 0.935361 0.937347 0.939313 0.941261 0.943189 0.945098 0.946983 0.948841 0.950671 0.952476 0.954255 0.956010 0.957742 0.959451 0.961139 0.962806 0.964454 0.966082 0.967693 0.969287 0.970864 0.972426 0.973974 0.975508 0.977030 0.978540 0.980040 0.981529 0.983010 0.984482 0.985947 0.987406 0.988860 0.990309 0.991754 0.993197 0.994638 0.996078))
+(time 0)
+(channel green)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.007843 -1.000000 -1.000000 0.121569 0.176471 -1.000000 -1.000000 0.247059 0.345098 -1.000000 -1.000000 0.372549 0.498039 -1.000000 -1.000000 0.498039 0.635294 -1.000000 -1.000000 0.623529 0.749020 -1.000000 -1.000000 0.749020 0.850980 -1.000000 -1.000000 0.874510 0.933333 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.007843 0.013326 0.018808 0.024290 0.029771 0.035251 0.040730 0.046207 0.051682 0.057155 0.062626 0.068094 0.073559 0.079021 0.084479 0.089933 0.095384 0.100830 0.106271 0.111708 0.117139 0.122566 0.127986 0.133401 0.138809 0.144211 0.149606 0.154994 0.160375 0.165748 0.171114 0.176471 0.181827 0.187186 0.192548 0.197913 0.203278 0.208644 0.214009 0.219372 0.224732 0.230089 0.235441 0.240788 0.246128 0.251460 0.256785 0.262100 0.267404 0.272698 0.277979 0.283247 0.288501 0.293740 0.298963 0.304170 0.309358 0.314528 0.319678 0.324807 0.329914 0.334999 0.340061 0.345098 0.350115 0.355116 0.360103 0.365073 0.370029 0.374969 0.379894 0.384804 0.389698 0.394577 0.399441 0.404289 0.409122 0.413940 0.418742 0.423529 0.428301 0.433057 0.437799 0.442524 0.447235 0.451930 0.456610 0.461274 0.465924 0.470557 0.475176 0.479779 0.484367 0.488940 0.493497 0.498039 0.502569 0.507091 0.511604 0.516107 0.520600 0.525081 0.529550 0.534007 0.538450 0.542879 0.547294 0.551692 0.556075 0.560440 0.564788 0.569117 0.573428 0.577718 0.581988 0.586236 0.590462 0.594666 0.598846 0.603002 0.607133 0.611239 0.615318 0.619370 0.623395 0.627391 0.631357 0.635294 0.639199 0.643070 0.646908 0.650716 0.654494 0.658242 0.661962 0.665656 0.669323 0.672966 0.676585 0.680182 0.683757 0.687311 0.690846 0.694363 0.697862 0.701346 0.704814 0.708269 0.711710 0.715139 0.718558 0.721967 0.725368 0.728761 0.732147 0.735528 0.738905 0.742278 0.745650 0.749020 0.752388 0.755752 0.759110 0.762462 0.765808 0.769146 0.772476 0.775797 0.779108 0.782410 0.785700 0.788978 0.792244 0.795497 0.798736 0.801961 0.805170 0.808363 0.811539 0.814698 0.817839 0.820961 0.824063 0.827144 0.830205 0.833244 0.836260 0.839254 0.842223 0.845168 0.848087 0.850980 0.853850 0.856701 0.859534 0.862346 0.865140 0.867915 0.870670 0.873406 0.876124 0.878822 0.881500 0.884160 0.886801 0.889422 0.892024 0.894607 0.897171 0.899716 0.902242 0.904748 0.907236 0.909704 0.912153 0.914583 0.916994 0.919385 0.921758 0.924111 0.926445 0.928760 0.931056 0.933333 0.935586 0.937811 0.940009 0.942181 0.944328 0.946451 0.948551 0.950628 0.952683 0.954718 0.956733 0.958729 0.960708 0.962669 0.964614 0.966544 0.968459 0.970361 0.972251 0.974128 0.975995 0.977852 0.979701 0.981541 0.983374 0.985200 0.987021 0.988838 0.990651 0.992462 0.994270 0.996078))
+(time 0)
+(channel blue)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.007843 -1.000000 -1.000000 0.121569 0.164706 -1.000000 -1.000000 0.247059 0.329412 -1.000000 -1.000000 0.372549 0.482353 -1.000000 -1.000000 0.498039 0.611765 -1.000000 -1.000000 0.623529 0.733333 -1.000000 -1.000000 0.749020 0.835294 -1.000000 -1.000000 0.874510 0.921569 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.007843 0.012881 0.017919 0.022958 0.027997 0.033036 0.038076 0.043117 0.048159 0.053202 0.058246 0.063292 0.068339 0.073388 0.078438 0.083491 0.088545 0.093602 0.098661 0.103723 0.108787 0.113854 0.118924 0.123997 0.129073 0.134152 0.139235 0.144322 0.149412 0.154506 0.159604 0.164706 0.169818 0.174946 0.180089 0.185244 0.190410 0.195587 0.200773 0.205966 0.211165 0.216369 0.221577 0.226787 0.231998 0.237209 0.242417 0.247623 0.252824 0.258020 0.263208 0.268389 0.273559 0.278718 0.283865 0.288999 0.294117 0.299219 0.304303 0.309368 0.314413 0.319436 0.324436 0.329412 0.334375 0.339337 0.344297 0.349253 0.354206 0.359153 0.364093 0.369026 0.373950 0.378865 0.383769 0.388661 0.393540 0.398405 0.403255 0.408088 0.412905 0.417703 0.422482 0.427240 0.431977 0.436692 0.441382 0.446048 0.450688 0.455301 0.459886 0.464442 0.468967 0.473462 0.477924 0.482353 0.486746 0.491102 0.495422 0.499709 0.503963 0.508186 0.512379 0.516544 0.520682 0.524795 0.528884 0.532951 0.536996 0.541022 0.545029 0.549020 0.552995 0.556957 0.560906 0.564844 0.568773 0.572693 0.576607 0.580515 0.584420 0.588322 0.592223 0.596125 0.600028 0.603935 0.607847 0.611765 0.615688 0.619614 0.623542 0.627470 0.631398 0.635324 0.639248 0.643168 0.647083 0.650992 0.654895 0.658789 0.662674 0.666549 0.670413 0.674265 0.678103 0.681926 0.685734 0.689526 0.693299 0.697054 0.700789 0.704503 0.708196 0.711865 0.715509 0.719129 0.722722 0.726288 0.729825 0.733333 0.736814 0.740273 0.743709 0.747124 0.750516 0.753888 0.757239 0.760570 0.763880 0.767170 0.770442 0.773694 0.776927 0.780142 0.783340 0.786519 0.789682 0.792827 0.795956 0.799069 0.802166 0.805248 0.808314 0.811366 0.814404 0.817427 0.820437 0.823434 0.826417 0.829388 0.832347 0.835294 0.838226 0.841139 0.844033 0.846909 0.849768 0.852609 0.855434 0.858241 0.861033 0.863808 0.866568 0.869313 0.872043 0.874758 0.877460 0.880147 0.882821 0.885482 0.888131 0.890767 0.893391 0.896004 0.898605 0.901195 0.903775 0.906345 0.908904 0.911455 0.913996 0.916529 0.919053 0.921569 0.924073 0.926560 0.929031 0.931486 0.933926 0.936352 0.938763 0.941161 0.943547 0.945919 0.948280 0.950630 0.952969 0.955298 0.957617 0.959927 0.962228 0.964521 0.966806 0.969085 0.971357 0.973623 0.975884 0.978140 0.980392 0.982640 0.984884 0.987126 0.989366 0.991604 0.993841 0.996078))
+(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
View
40 skin-whitening-effect.c
@@ -207,5 +207,45 @@ run_effect (gint32 image_ID, WhiteningEffectType effect)
gimp_curves_spline (layer, GIMP_HISTOGRAM_BLUE, 18, blue_pts);
break;
}
+ case WHITENING_EFFECT_MODERATE_FLESH:
+ {
+ guint8 red_pts[] = {
+ 0.000000 * 255, 0.007843 * 255,
+ 0.121569 * 255, 0.192157 * 255,
+ 0.247059 * 255, 0.372549 * 255,
+ 0.372549 * 255, 0.529412 * 255,
+ 0.498039 * 255, 0.666667 * 255,
+ 0.623529 * 255, 0.784314 * 255,
+ 0.749020 * 255, 0.874510 * 255,
+ 0.874510 * 255, 0.945098 * 255,
+ 1.000000 * 255, 0.996078 * 255,
+ };
+ guint8 green_pts[] = {
+ 0.000000 * 255, 0.007843 * 255,
+ 0.121569 * 255, 0.176471 * 255,
+ 0.247059 * 255, 0.345098 * 255,
+ 0.372549 * 255, 0.498039 * 255,
+ 0.498039 * 255, 0.635294 * 255,
+ 0.623529 * 255, 0.749020 * 255,
+ 0.749020 * 255, 0.850980 * 255,
+ 0.874510 * 255, 0.933333 * 255,
+ 1.000000 * 255, 0.996078 * 255,
+ };
+ guint8 blue_pts[] = {
+ 0.000000 * 255, 0.007843 * 255,
+ 0.121569 * 255, 0.164706 * 255,
+ 0.247059 * 255, 0.329412 * 255,
+ 0.372549 * 255, 0.482353 * 255,
+ 0.498039 * 255, 0.611765 * 255,
+ 0.623529 * 255, 0.733333 * 255,
+ 0.749020 * 255, 0.835294 * 255,
+ 0.874510 * 255, 0.921569 * 255,
+ 1.000000 * 255, 0.996078 * 255,
+ };
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_RED, 18, red_pts);
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_GREEN, 18, green_pts);
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_BLUE, 18, blue_pts);
+ break;
+ }
}
}
View
2 skin-whitening-effect.h
@@ -25,7 +25,7 @@ typedef enum
WHITENING_EFFECT_MODERATE_PINK,
WHITENING_EFFECT_HIGH_PINK,
WHITENING_EFFECT_LITTLE_FLESH,
- WHITENING_EFFECT_MODERATE_FLESH, // TODO
+ WHITENING_EFFECT_MODERATE_FLESH,
WHITENING_EFFECT_HIGH_FLESH, // TODO
} WhiteningEffectType;
View
5 skin-whitening.c
@@ -42,6 +42,7 @@ static const WhiteningEffectType effects[] =
WHITENING_EFFECT_MODERATE_PINK,
WHITENING_EFFECT_HIGH_PINK,
WHITENING_EFFECT_LITTLE_FLESH,
+ WHITENING_EFFECT_MODERATE_FLESH,
};
static void query (void);
@@ -385,6 +386,10 @@ effect_icon_new (WhiteningEffectType effect)
data = skin_whitening_7;
title = "Little Flesh";
break;
+ case WHITENING_EFFECT_MODERATE_FLESH:
+ data = skin_whitening_8;
+ title = "Moderate Flesh";
+ break;
}
GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);

0 comments on commit d2b76c6

Please sign in to comment.
Something went wrong with that request. Please try again.