Permalink
Browse files

fix beautify warm effect

  • Loading branch information...
1 parent 11df691 commit fc24f03020bcf25bae974d7b37051a42717f41c6 @hejiann committed Jul 10, 2012
Showing with 107 additions and 5 deletions.
  1. +3 −0 README
  2. +14 −5 beautify.c
  3. +45 −0 curves/newjapan
  4. +45 −0 curves/warm
View
@@ -24,6 +24,9 @@ GIMP menu: Tools -> Beautify -> Rip Border
CHANGELOG
===================
+2012-07-10
+beautify: Fix warm effect
+
2012-07-09
beautify: Fix New Japan effect
View
@@ -705,10 +705,24 @@ do_effect (gint32 image, BeautifyEffectType effect)
case BEAUTIFY_EFFECT_WARM:
{
+ /*
GimpRGB color = {1.0, 0.5, 0, 1.0};
gimp_context_set_foreground (&color);
gimp_edit_fill (effect_layer, GIMP_FOREGROUND_FILL);
gimp_layer_set_mode (effect_layer, GIMP_OVERLAY_MODE);
+ */
+ guint8 red_pts[] = {
+ 0.0, 0.082031 * 255,
+ 0.405488 * 255, 0.621094 * 255,
+ 0.954268 * 255, 1.000000 * 255,
+ };
+ guint8 green_pts[] = {
+ 0.0, 0.0,
+ 0.503049 * 255, 0.636719 * 255,
+ 1.000000 * 255, 1.000000 * 255,
+ };
+ gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_RED, 6, red_pts);
+ gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_GREEN, 6, green_pts);
}
break;
@@ -727,11 +741,6 @@ do_effect (gint32 image, BeautifyEffectType effect)
break;
case BEAUTIFY_EFFECT_NEW_JAPANESE:
{
- /*
- gimp_levels (effect_layer, GIMP_HISTOGRAM_RED, 0, 255, 1, 22, 196);
- gimp_levels (effect_layer, GIMP_HISTOGRAM_GREEN, 0, 255, 1, 10, 224);
- gimp_levels (effect_layer, GIMP_HISTOGRAM_BLUE, 26, 255, 1, 0, 246);
- */
guint8 red_pts[] = {
0.0, 0.042969 * 255,
0.350610 * 255, 0.320312 * 255,
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.042969 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 0.350610 0.320312 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 0.621951 0.566406 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 0.847561 0.632812 -1.000000 -1.000000 1.000000 0.769531)
+ (n-samples 256)
+ (samples 256 0.042969 0.045972 0.048975 0.051978 0.054981 0.057985 0.060989 0.063993 0.066999 0.070004 0.073010 0.076017 0.079025 0.082034 0.085044 0.088055 0.091066 0.094079 0.097094 0.100109 0.103127 0.106145 0.109165 0.112187 0.115210 0.118236 0.121263 0.124292 0.127323 0.130356 0.133391 0.136429 0.139469 0.142511 0.145556 0.148603 0.151653 0.154705 0.157761 0.160819 0.163880 0.166944 0.170011 0.173081 0.176154 0.179231 0.182311 0.185394 0.188481 0.191572 0.194666 0.197764 0.200865 0.203971 0.207080 0.210194 0.213311 0.216433 0.219559 0.222689 0.225824 0.228963 0.232107 0.235255 0.238408 0.241566 0.244728 0.247896 0.251068 0.254246 0.257429 0.260617 0.263810 0.267008 0.270212 0.273422 0.276637 0.279858 0.283084 0.286316 0.289555 0.292799 0.296049 0.299305 0.302567 0.305836 0.309111 0.312392 0.315680 0.320312 0.323636 0.327004 0.330415 0.333867 0.337359 0.340888 0.344454 0.348055 0.351688 0.355352 0.359046 0.362768 0.366516 0.370288 0.374082 0.377898 0.381733 0.385586 0.389455 0.393338 0.397234 0.401140 0.405056 0.408979 0.412908 0.416841 0.420777 0.424713 0.428649 0.432582 0.436510 0.440433 0.444348 0.448253 0.452148 0.456030 0.459897 0.463748 0.467582 0.471395 0.475188 0.478958 0.482703 0.486422 0.490113 0.493775 0.497405 0.501002 0.504565 0.508091 0.511579 0.515027 0.518434 0.521798 0.525117 0.528389 0.531614 0.534788 0.537911 0.540980 0.543995 0.546953 0.549853 0.552692 0.555470 0.558185 0.560834 0.563417 0.565931 0.566406 0.568811 0.571095 0.573263 0.575320 0.577268 0.579112 0.580857 0.582506 0.584064 0.585534 0.586921 0.588229 0.589462 0.590624 0.591719 0.592751 0.593725 0.594644 0.595513 0.596335 0.597115 0.597857 0.598565 0.599243 0.599896 0.600526 0.601139 0.601739 0.602329 0.602914 0.603497 0.604084 0.604677 0.605282 0.605902 0.606542 0.607205 0.607895 0.608617 0.609375 0.610173 0.611014 0.611904 0.612846 0.613845 0.614903 0.616027 0.617218 0.618483 0.619824 0.621247 0.622754 0.624351 0.626041 0.627828 0.629716 0.632812 0.634973 0.637241 0.639611 0.642081 0.644650 0.647313 0.650068 0.652912 0.655843 0.658858 0.661953 0.665126 0.668375 0.671696 0.675087 0.678544 0.682065 0.685648 0.689289 0.692986 0.696736 0.700535 0.704382 0.708274 0.712207 0.716178 0.720186 0.724227 0.728299 0.732398 0.736522 0.740668 0.744833 0.749015 0.753210 0.757416 0.761631 0.765850 0.769531))
+(time 0)
+(channel green)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.031250 -1.000000 -1.000000 0.125000 0.144531 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 0.500000 0.523438 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 -1.000000 0.881098 0.738281 -1.000000 -1.000000 1.000000 0.882812)
+ (n-samples 256)
+ (samples 256 0.031250 0.034651 0.038053 0.041456 0.044863 0.048273 0.051687 0.055107 0.058533 0.061967 0.065408 0.068859 0.072319 0.075791 0.079274 0.082770 0.086279 0.089803 0.093343 0.096898 0.100471 0.104062 0.107672 0.111301 0.114952 0.118624 0.122319 0.126037 0.129780 0.133548 0.137343 0.141164 0.144531 0.148403 0.152296 0.156212 0.160147 0.164103 0.168079 0.172073 0.176086 0.180116 0.184163 0.188227 0.192306 0.196400 0.200508 0.204630 0.208765 0.212913 0.217072 0.221242 0.225423 0.229613 0.233813 0.238021 0.242238 0.246461 0.250691 0.254927 0.259168 0.263414 0.267663 0.271917 0.276172 0.280430 0.284690 0.288950 0.293210 0.297470 0.301728 0.305985 0.310239 0.314490 0.318737 0.322980 0.327218 0.331450 0.335676 0.339895 0.344106 0.348309 0.352503 0.356687 0.360861 0.365024 0.369176 0.373316 0.377443 0.381556 0.385655 0.389740 0.393809 0.397862 0.401898 0.405917 0.409918 0.413900 0.417864 0.421807 0.425729 0.429631 0.433510 0.437367 0.441201 0.445012 0.448797 0.452558 0.456293 0.460001 0.463683 0.467336 0.470962 0.474558 0.478125 0.481662 0.485167 0.488641 0.492083 0.495492 0.498868 0.502210 0.505516 0.508787 0.512023 0.515221 0.518382 0.521505 0.523438 0.526493 0.529501 0.532463 0.535380 0.538251 0.541080 0.543865 0.546609 0.549312 0.551976 0.554600 0.557187 0.559736 0.562250 0.564728 0.567172 0.569583 0.571962 0.574309 0.576625 0.578913 0.581171 0.583402 0.585607 0.587785 0.589939 0.592069 0.594176 0.596261 0.598324 0.600368 0.602393 0.604399 0.606388 0.608361 0.610318 0.612261 0.614190 0.616106 0.618011 0.619905 0.621789 0.623665 0.625532 0.627393 0.629247 0.631097 0.632942 0.634784 0.636623 0.638462 0.640299 0.642138 0.643978 0.645820 0.647665 0.649515 0.651370 0.653231 0.655099 0.656976 0.658861 0.660756 0.662662 0.664580 0.666510 0.668454 0.670413 0.672387 0.674377 0.676385 0.678412 0.680457 0.682523 0.684610 0.686719 0.688852 0.691008 0.693189 0.695395 0.697629 0.699890 0.702180 0.704500 0.706850 0.709232 0.711646 0.714093 0.716575 0.719092 0.721645 0.724235 0.726863 0.729530 0.732237 0.734985 0.738281 0.741195 0.744296 0.747576 0.751030 0.754651 0.758434 0.762371 0.766456 0.770683 0.775046 0.779538 0.784153 0.788884 0.793725 0.798671 0.803713 0.808847 0.814065 0.819361 0.824730 0.830164 0.835657 0.841204 0.846796 0.852429 0.858096 0.863791 0.869506 0.875236 0.882812))
+(time 0)
+(channel blue)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.000000 -1.000000 -1.000000 0.121951 0.039062 -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 0.972656)
+ (n-samples 256)
+ (samples 256 0.000000 0.000000 0.000000 0.000000 0.000000 0.000050 0.000148 0.000293 0.000493 0.000757 0.001093 0.001508 0.002010 0.002607 0.003308 0.004119 0.005050 0.006108 0.007300 0.008636 0.010122 0.011767 0.013578 0.015565 0.017733 0.020092 0.022650 0.025414 0.028392 0.031592 0.035023 0.039062 0.042879 0.046701 0.050527 0.054358 0.058193 0.062033 0.065878 0.069728 0.073582 0.077440 0.081304 0.085171 0.089043 0.092920 0.096801 0.100687 0.104577 0.108471 0.112370 0.116273 0.120181 0.124092 0.128008 0.131929 0.135853 0.139782 0.143715 0.147652 0.151594 0.155539 0.159489 0.163443 0.167400 0.171362 0.175328 0.179298 0.183272 0.187250 0.191232 0.195218 0.199207 0.203201 0.207199 0.211200 0.215205 0.219214 0.223227 0.227243 0.231263 0.235287 0.239315 0.243346 0.247381 0.251420 0.255462 0.259508 0.263557 0.267610 0.271667 0.275727 0.279790 0.283857 0.287927 0.292001 0.296078 0.300159 0.304243 0.308330 0.312420 0.316514 0.320611 0.324712 0.328815 0.332922 0.337032 0.341145 0.345262 0.349381 0.353504 0.357629 0.361758 0.365890 0.370024 0.374162 0.378303 0.382446 0.386593 0.390743 0.394895 0.399050 0.403208 0.407369 0.411533 0.415700 0.419869 0.424041 0.428216 0.432393 0.436573 0.440756 0.444941 0.449129 0.453320 0.457513 0.461709 0.465907 0.470108 0.474311 0.478517 0.482725 0.486936 0.491149 0.495364 0.499582 0.503802 0.508024 0.512249 0.516476 0.520705 0.524936 0.529170 0.533406 0.537644 0.541884 0.546126 0.550370 0.554617 0.558865 0.563116 0.567368 0.571623 0.575880 0.580138 0.584398 0.588661 0.592925 0.597191 0.601459 0.605729 0.610000 0.614274 0.618549 0.622826 0.627104 0.631384 0.635666 0.639950 0.644235 0.648522 0.652811 0.657101 0.661392 0.665685 0.669980 0.674276 0.678574 0.682873 0.687173 0.691475 0.695778 0.700083 0.704388 0.708696 0.713004 0.717314 0.721625 0.725937 0.730251 0.734565 0.738881 0.743198 0.747516 0.751836 0.756156 0.760477 0.764800 0.769123 0.773447 0.777773 0.782099 0.786426 0.790755 0.795084 0.799414 0.803744 0.808076 0.812408 0.816742 0.821076 0.825410 0.829746 0.834082 0.838419 0.842756 0.847094 0.851433 0.855772 0.860112 0.864453 0.868794 0.873135 0.877477 0.881819 0.886162 0.890506 0.894849 0.899193 0.903538 0.907883 0.912228 0.916573 0.920919 0.925265 0.929611 0.933957 0.938304 0.942650 0.946997 0.951344 0.955691 0.960039 0.964386 0.968733 0.972656))
+(time 0)
+(channel alpha)
+(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))
+
+# end of curves tool settings
Oops, something went wrong.

0 comments on commit fc24f03

Please sign in to comment.