Permalink
Browse files

skin-whitening: add the moderate pink effect.

  • Loading branch information...
1 parent 6e375fe commit b1c9ac2d16f1aa3b26159398325f926f0a442114 @hejiann committed Jul 31, 2012
Showing with 81 additions and 13 deletions.
  1. +1 −0 README
  2. +45 −0 curves/skin-whitening/moderate-pink
  3. +29 −11 skin-whitening-effect.c
  4. +1 −1 skin-whitening-effect.h
  5. +5 −1 skin-whitening.c
View
1 README
@@ -52,6 +52,7 @@ texture-border: add scrollbar to textures and make the dialog display quickly.
rip-border: slim the plug-in size by only provide top textures and let other textures can be download.
rip-border: add scrollbar to textures and make the dialog display quickly.
skin whitening: add the little pink effect.
+skin whitening: add the moderate pink effect.
2012-07-30:
beautify: fix missing effect.
@@ -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.160784 -1.000000 -1.000000 0.247059 0.321569 -1.000000 -1.000000 0.372549 0.470588 -1.000000 -1.000000 0.498039 0.600000 -1.000000 -1.000000 0.623529 0.721569 -1.000000 -1.000000 0.749020 0.827451 -1.000000 -1.000000 0.874510 0.917647 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.007843 0.012754 0.017664 0.022575 0.027486 0.032398 0.037311 0.042225 0.047139 0.052055 0.056972 0.061890 0.066810 0.071732 0.076656 0.081581 0.086509 0.091439 0.096372 0.101307 0.106245 0.111186 0.116130 0.121077 0.126027 0.130981 0.135938 0.140899 0.145864 0.150833 0.155806 0.160784 0.165772 0.170776 0.175794 0.180825 0.185869 0.190922 0.195984 0.201055 0.206131 0.211213 0.216298 0.221386 0.226474 0.231563 0.236649 0.241733 0.246812 0.251886 0.256952 0.262011 0.267059 0.272096 0.277122 0.282133 0.287129 0.292109 0.297071 0.302014 0.306937 0.311838 0.316716 0.321569 0.326408 0.331242 0.336071 0.340893 0.345710 0.350518 0.355319 0.360111 0.364893 0.369665 0.374425 0.379175 0.383911 0.388635 0.393344 0.398039 0.402719 0.407383 0.412030 0.416659 0.421270 0.425863 0.430435 0.434988 0.439519 0.444028 0.448515 0.452979 0.457419 0.461834 0.466224 0.470588 0.474923 0.479229 0.483506 0.487756 0.491980 0.496178 0.500352 0.504503 0.508632 0.512741 0.516829 0.520898 0.524950 0.528985 0.533005 0.537010 0.541001 0.544981 0.548949 0.552907 0.556855 0.560796 0.564730 0.568658 0.572581 0.576501 0.580418 0.584333 0.588248 0.592163 0.596080 0.600000 0.603921 0.607842 0.611762 0.615679 0.619593 0.623504 0.627410 0.631311 0.635207 0.639096 0.642978 0.646852 0.650718 0.654574 0.658420 0.662255 0.666079 0.669891 0.673689 0.677474 0.681245 0.685000 0.688740 0.692464 0.696170 0.699858 0.703527 0.707177 0.710807 0.714416 0.718004 0.721569 0.725115 0.728646 0.732162 0.735662 0.739147 0.742617 0.746071 0.749510 0.752934 0.756342 0.759735 0.763113 0.766475 0.769823 0.773154 0.776471 0.779772 0.783058 0.786328 0.789583 0.792823 0.796048 0.799257 0.802451 0.805630 0.808793 0.811941 0.815074 0.818191 0.821293 0.824380 0.827451 0.830505 0.833541 0.836558 0.839557 0.842538 0.845502 0.848448 0.851379 0.854293 0.857191 0.860073 0.862940 0.865793 0.868631 0.871455 0.874265 0.877061 0.879845 0.882616 0.885375 0.888121 0.890856 0.893580 0.896293 0.898995 0.901687 0.904370 0.907043 0.909707 0.912362 0.915008 0.917647 0.920273 0.922883 0.925476 0.928054 0.930617 0.933165 0.935699 0.938220 0.940728 0.943223 0.945707 0.948179 0.950640 0.953092 0.955533 0.957965 0.960389 0.962805 0.965213 0.967614 0.970009 0.972398 0.974781 0.977160 0.979534 0.981904 0.984272 0.986636 0.988998 0.991359 0.993719 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.160784 -1.000000 -1.000000 0.247059 0.321569 -1.000000 -1.000000 0.372549 0.470588 -1.000000 -1.000000 0.498039 0.600000 -1.000000 -1.000000 0.623529 0.721569 -1.000000 -1.000000 0.749020 0.827451 -1.000000 -1.000000 0.874510 0.917647 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.007843 0.012754 0.017664 0.022575 0.027486 0.032398 0.037311 0.042225 0.047139 0.052055 0.056972 0.061890 0.066810 0.071732 0.076656 0.081581 0.086509 0.091439 0.096372 0.101307 0.106245 0.111186 0.116130 0.121077 0.126027 0.130981 0.135938 0.140899 0.145864 0.150833 0.155806 0.160784 0.165772 0.170776 0.175794 0.180825 0.185869 0.190922 0.195984 0.201055 0.206131 0.211213 0.216298 0.221386 0.226474 0.231563 0.236649 0.241733 0.246812 0.251886 0.256952 0.262011 0.267059 0.272096 0.277122 0.282133 0.287129 0.292109 0.297071 0.302014 0.306937 0.311838 0.316716 0.321569 0.326408 0.331242 0.336071 0.340893 0.345710 0.350518 0.355319 0.360111 0.364893 0.369665 0.374425 0.379175 0.383911 0.388635 0.393344 0.398039 0.402719 0.407383 0.412030 0.416659 0.421270 0.425863 0.430435 0.434988 0.439519 0.444028 0.448515 0.452979 0.457419 0.461834 0.466224 0.470588 0.474923 0.479229 0.483506 0.487756 0.491980 0.496178 0.500352 0.504503 0.508632 0.512741 0.516829 0.520898 0.524950 0.528985 0.533005 0.537010 0.541001 0.544981 0.548949 0.552907 0.556855 0.560796 0.564730 0.568658 0.572581 0.576501 0.580418 0.584333 0.588248 0.592163 0.596080 0.600000 0.603921 0.607842 0.611762 0.615679 0.619593 0.623504 0.627410 0.631311 0.635207 0.639096 0.642978 0.646852 0.650718 0.654574 0.658420 0.662255 0.666079 0.669891 0.673689 0.677474 0.681245 0.685000 0.688740 0.692464 0.696170 0.699858 0.703527 0.707177 0.710807 0.714416 0.718004 0.721569 0.725115 0.728646 0.732162 0.735662 0.739147 0.742617 0.746071 0.749510 0.752934 0.756342 0.759735 0.763113 0.766475 0.769823 0.773154 0.776471 0.779772 0.783058 0.786328 0.789583 0.792823 0.796048 0.799257 0.802451 0.805630 0.808793 0.811941 0.815074 0.818191 0.821293 0.824380 0.827451 0.830505 0.833541 0.836558 0.839557 0.842538 0.845502 0.848448 0.851379 0.854293 0.857191 0.860073 0.862940 0.865793 0.868631 0.871455 0.874265 0.877061 0.879845 0.882616 0.885375 0.888121 0.890856 0.893580 0.896293 0.898995 0.901687 0.904370 0.907043 0.909707 0.912362 0.915008 0.917647 0.920273 0.922883 0.925476 0.928054 0.930617 0.933165 0.935699 0.938220 0.940728 0.943223 0.945707 0.948179 0.950640 0.953092 0.955533 0.957965 0.960389 0.962805 0.965213 0.967614 0.970009 0.972398 0.974781 0.977160 0.979534 0.981904 0.984272 0.986636 0.988998 0.991359 0.993719 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
@@ -93,7 +93,7 @@ run_effect (gint32 image_ID, WhiteningEffectType effect)
0.874510 * 255, 0.913725 * 255,
1.000000 * 255, 0.996078 * 255,
};
- guint8 green_pts[] = {
+ guint8 pts[] = {
0.000000 * 255, 0.007843 * 255,
0.121569 * 255, 0.145098 * 255,
0.247059 * 255, 0.290196 * 255,
@@ -104,20 +104,38 @@ run_effect (gint32 image_ID, WhiteningEffectType effect)
0.874510 * 255, 0.898039 * 255,
1.000000 * 255, 0.996078 * 255,
};
- guint8 blue_pts[] = {
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_RED, 18, red_pts);
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_GREEN, 18, pts);
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_BLUE, 18, pts);
+ break;
+ }
+ case WHITENING_EFFECT_MODERATE_PINK:
+ {
+ guint8 red_pts[] = {
0.000000 * 255, 0.007843 * 255,
- 0.121569 * 255, 0.145098 * 255,
- 0.247059 * 255, 0.290196 * 255,
- 0.372549 * 255, 0.427451 * 255,
- 0.498039 * 255, 0.556863 * 255,
- 0.623529 * 255, 0.678431 * 255,
- 0.749020 * 255, 0.792157 * 255,
- 0.874510 * 255, 0.898039 * 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 pts[] = {
+ 0.000000 * 255, 0.007843 * 255,
+ 0.121569 * 255, 0.160784 * 255,
+ 0.247059 * 255, 0.321569 * 255,
+ 0.372549 * 255, 0.470588 * 255,
+ 0.498039 * 255, 0.600000 * 255,
+ 0.623529 * 255, 0.721569 * 255,
+ 0.749020 * 255, 0.827451 * 255,
+ 0.874510 * 255, 0.917647 * 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);
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_GREEN, 18, pts);
+ gimp_curves_spline (layer, GIMP_HISTOGRAM_BLUE, 18, pts);
break;
}
}
View
@@ -22,7 +22,7 @@ typedef enum
WHITENING_EFFECT_MODERATE_WHITENING,
WHITENING_EFFECT_HIGH_WHITENING,
WHITENING_EFFECT_LITTLE_PINK,
- WHITENING_EFFECT_MODERATE_PINK, // TODO
+ WHITENING_EFFECT_MODERATE_PINK,
WHITENING_EFFECT_HIGH_PINK, // TODO
WHITENING_EFFECT_LITTLE_FLESH, // TODO
WHITENING_EFFECT_MODERATE_FLESH, // TODO
View
@@ -39,6 +39,7 @@ static const WhiteningEffectType effects[] =
WHITENING_EFFECT_MODERATE_WHITENING,
WHITENING_EFFECT_HIGH_WHITENING,
WHITENING_EFFECT_LITTLE_PINK,
+ WHITENING_EFFECT_MODERATE_PINK,
};
static void query (void);
@@ -360,7 +361,7 @@ effect_icon_new (WhiteningEffectType effect)
break;
case WHITENING_EFFECT_MODERATE_WHITENING:
data = skin_whitening_2;
- title = "Middle Whitening";
+ title = "Moderate Whitening";
break;
case WHITENING_EFFECT_HIGH_WHITENING:
data = skin_whitening_3;
@@ -370,6 +371,9 @@ effect_icon_new (WhiteningEffectType effect)
data = skin_whitening_4;
title = "Little Pink";
break;
+ case WHITENING_EFFECT_MODERATE_PINK:
+ data = skin_whitening_5;
+ title = "Moderate Pink";
}
GtkWidget *box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 2);

0 comments on commit b1c9ac2

Please sign in to comment.