Permalink
Browse files

beautify: add yellowing dark corners effect

  • Loading branch information...
1 parent 30c0fc3 commit e78613897ccdabbb310e1dd0a4709b56109c4618 @hejiann committed Jul 24, 2012
View
1 README
@@ -37,6 +37,7 @@ beautify: add deep blue effect
beautify: add bronze effect
beautify: add milk effect
beautify: add elegant effect
+beautify: add yellowing dark corners effect
2012-07-23
beautify: fix soft light effect
View
@@ -359,6 +359,56 @@ run_effect (gint32 image_ID, BeautifyEffectType effect)
gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_BLUE, 18, blue_pts);
}
break;
+ case BEAUTIFY_EFFECT_YELLOWING_DARK_CORNERS:
+ {
+ guint8 red_pts[] = {
+ 0.000000 * 255, 0.093137 * 255,
+ 0.121569 * 255, 0.125134 * 255,
+ 0.247059 * 255, 0.227000 * 255,
+ 0.372549 * 255, 0.372794 * 255,
+ 0.498039 * 255, 0.537491 * 255,
+ 0.623529 * 255, 0.706434 * 255,
+ 0.749020 * 255, 0.852155 * 255,
+ 0.874510 * 255, 0.953969 * 255,
+ 1.000000 * 255, 0.996078 * 255,
+ };
+ guint8 green_pts[] = {
+ 0.000000 * 255, 0.092647 * 255,
+ 0.121569 * 255, 0.125205 * 255,
+ 0.247059 * 255, 0.227129 * 255,
+ 0.372549 * 255, 0.372871 * 255,
+ 0.498039 * 255, 0.537711 * 255,
+ 0.623529 * 255, 0.706357 * 255,
+ 0.749020 * 255, 0.851153 * 255,
+ 0.874510 * 255, 0.953240 * 255,
+ 1.000000 * 255, 0.996078 * 255,
+ };
+ guint8 blue_pts[] = {
+ 0.000000 * 255, 0.003922 * 255,
+ 0.121569 * 255, 0.029810 * 255,
+ 0.247059 * 255, 0.143778 * 255,
+ 0.372549 * 255, 0.305764 * 255,
+ 0.498039 * 255, 0.488796 * 255,
+ 0.623529 * 255, 0.672134 * 255,
+ 0.749020 * 255, 0.833704 * 255,
+ 0.874510 * 255, 0.948010 * 255,
+ 1.000000 * 255, 0.996078 * 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);
+
+ gint32 layer;
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_new_from_inline (-1, texture_yellowing_dark_corners, FALSE, NULL);
+ layer = gimp_layer_new_from_pixbuf (image_ID, "texture", pixbuf, 100, GIMP_MULTIPLY_MODE, 0, 0);
+ gimp_image_add_layer (image_ID, layer, -1);
+ gimp_layer_scale (layer, width, height, FALSE);
+ gimp_image_merge_down (image_ID, layer, GIMP_CLIP_TO_BOTTOM_LAYER);
+
+ break;
+ }
case BEAUTIFY_EFFECT_IMPRESSION:
{
guint8 red_pts[] = {
View
@@ -31,6 +31,7 @@ typedef enum
BEAUTIFY_EFFECT_FILM,
BEAUTIFY_EFFECT_HDR,
BEAUTIFY_EFFECT_CLASSIC_HDR,
+ BEAUTIFY_EFFECT_YELLOWING_DARK_CORNERS,
BEAUTIFY_EFFECT_IMPRESSION,
BEAUTIFY_EFFECT_DEEP_BLUE,
BEAUTIFY_EFFECT_BRONZE,
View
@@ -1,3 +1,5 @@
+texture_yellowing_dark_corners
+ ./textures/effects/yellowing-dark-corners.png
texture_milk
./textures/effects/milk.jpg
texture_old_photos
View
@@ -57,6 +57,7 @@ static const BeautifyEffectType lomo_effects[] =
BEAUTIFY_EFFECT_FILM,
BEAUTIFY_EFFECT_HDR,
BEAUTIFY_EFFECT_CLASSIC_HDR,
+ BEAUTIFY_EFFECT_YELLOWING_DARK_CORNERS,
BEAUTIFY_EFFECT_IMPRESSION,
BEAUTIFY_EFFECT_DEEP_BLUE,
BEAUTIFY_EFFECT_BRONZE,
@@ -860,6 +861,9 @@ effect_icon_new (BeautifyEffectType effect)
case BEAUTIFY_EFFECT_CLASSIC_HDR:
title = "Classic HDR";
break;
+ case BEAUTIFY_EFFECT_YELLOWING_DARK_CORNERS:
+ title = "Yellow Dark Corner";
+ break;
case BEAUTIFY_EFFECT_IMPRESSION:
title = "Impression";
break;
@@ -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.093137 -1.000000 -1.000000 0.121569 0.125134 -1.000000 -1.000000 0.247059 0.227000 -1.000000 -1.000000 0.372549 0.372794 -1.000000 -1.000000 0.498039 0.537491 -1.000000 -1.000000 0.623529 0.706434 -1.000000 -1.000000 0.749020 0.852155 -1.000000 -1.000000 0.874510 0.953969 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.093137 0.093623 0.094113 0.094610 0.095117 0.095637 0.096175 0.096733 0.097315 0.097924 0.098564 0.099238 0.099949 0.100702 0.101499 0.102343 0.103239 0.104189 0.105198 0.106267 0.107402 0.108604 0.109879 0.111228 0.112656 0.114166 0.115761 0.117444 0.119220 0.121091 0.123061 0.125134 0.127303 0.129560 0.131901 0.134325 0.136830 0.139414 0.142074 0.144808 0.147614 0.150489 0.153433 0.156442 0.159514 0.162647 0.165839 0.169087 0.172391 0.175746 0.179152 0.182606 0.186105 0.189649 0.193233 0.196857 0.200518 0.204214 0.207942 0.211702 0.215489 0.219303 0.223140 0.227000 0.230903 0.234871 0.238902 0.242993 0.247142 0.251348 0.255607 0.259917 0.264276 0.268682 0.273132 0.277625 0.282157 0.286727 0.291332 0.295970 0.300639 0.305336 0.310059 0.314806 0.319575 0.324363 0.329167 0.333987 0.338819 0.343660 0.348510 0.353365 0.358223 0.363082 0.367940 0.372794 0.377662 0.382561 0.387490 0.392448 0.397433 0.402444 0.407480 0.412540 0.417621 0.422723 0.427845 0.432984 0.438140 0.443312 0.448498 0.453696 0.458905 0.464125 0.469353 0.474588 0.479829 0.485075 0.490324 0.495575 0.500827 0.506078 0.511326 0.516571 0.521812 0.527046 0.532273 0.537491 0.542719 0.547976 0.553258 0.558564 0.563891 0.569237 0.574598 0.579972 0.585358 0.590752 0.596151 0.601554 0.606958 0.612360 0.617758 0.623148 0.628530 0.633900 0.639256 0.644595 0.649914 0.655212 0.660485 0.665732 0.670949 0.676134 0.681284 0.686398 0.691473 0.696505 0.701493 0.706434 0.711349 0.716260 0.721164 0.726060 0.730947 0.735821 0.740681 0.745526 0.750353 0.755161 0.759947 0.764710 0.769447 0.774158 0.778839 0.783490 0.788108 0.792691 0.797238 0.801746 0.806214 0.810639 0.815021 0.819356 0.823644 0.827881 0.832067 0.836200 0.840276 0.844296 0.848256 0.852155 0.856009 0.859834 0.863628 0.867391 0.871120 0.874815 0.878474 0.882095 0.885677 0.889219 0.892718 0.896175 0.899586 0.902952 0.906269 0.909538 0.912756 0.915921 0.919034 0.922091 0.925092 0.928035 0.930919 0.933743 0.936504 0.939201 0.941833 0.944399 0.946897 0.949326 0.951684 0.953969 0.956175 0.958295 0.960334 0.962294 0.964177 0.965986 0.967724 0.969394 0.970998 0.972540 0.974021 0.975445 0.976814 0.978131 0.979399 0.980621 0.981799 0.982936 0.984034 0.985097 0.986128 0.987128 0.988101 0.989049 0.989976 0.990883 0.991774 0.992651 0.993517 0.994375 0.995228 0.996078))
+(time 0)
+(channel green)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.092647 -1.000000 -1.000000 0.121569 0.125205 -1.000000 -1.000000 0.247059 0.227129 -1.000000 -1.000000 0.372549 0.372871 -1.000000 -1.000000 0.498039 0.537711 -1.000000 -1.000000 0.623529 0.706357 -1.000000 -1.000000 0.749020 0.851153 -1.000000 -1.000000 0.874510 0.953240 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.092647 0.093156 0.093668 0.094186 0.094715 0.095258 0.095817 0.096397 0.097000 0.097631 0.098292 0.098987 0.099719 0.100491 0.101308 0.102172 0.103087 0.104056 0.105083 0.106170 0.107322 0.108541 0.109832 0.111197 0.112640 0.114164 0.115773 0.117470 0.119258 0.121141 0.123122 0.125205 0.127384 0.129648 0.131998 0.134429 0.136940 0.139529 0.142194 0.144932 0.147741 0.150620 0.153566 0.156577 0.159650 0.162785 0.165977 0.169226 0.172530 0.175885 0.179291 0.182744 0.186242 0.189785 0.193368 0.196991 0.200651 0.204346 0.208074 0.211832 0.215619 0.219432 0.223270 0.227129 0.231032 0.234999 0.239029 0.243119 0.247267 0.251471 0.255728 0.260036 0.264393 0.268796 0.273244 0.277734 0.282263 0.286830 0.291432 0.296068 0.300734 0.305428 0.310149 0.314893 0.319660 0.324445 0.329248 0.334066 0.338896 0.343737 0.348585 0.353440 0.358298 0.363157 0.368016 0.372871 0.377740 0.382642 0.387574 0.392536 0.397526 0.402542 0.407584 0.412649 0.417737 0.422845 0.427974 0.433120 0.438283 0.443462 0.448654 0.453859 0.459076 0.464302 0.469536 0.474778 0.480025 0.485276 0.490530 0.495786 0.501041 0.506295 0.511546 0.516793 0.522035 0.527269 0.532495 0.537711 0.542937 0.548191 0.553470 0.558773 0.564096 0.569437 0.574794 0.580164 0.585544 0.590932 0.596326 0.601723 0.607119 0.612514 0.617904 0.623287 0.628660 0.634020 0.639366 0.644694 0.650003 0.655289 0.660550 0.665783 0.670987 0.676158 0.681293 0.686391 0.691449 0.696465 0.701435 0.706357 0.711252 0.716140 0.721020 0.725890 0.730748 0.735592 0.740422 0.745234 0.750028 0.754801 0.759552 0.764279 0.768981 0.773655 0.778300 0.782915 0.787497 0.792045 0.796557 0.801031 0.805465 0.809859 0.814210 0.818516 0.822776 0.826988 0.831150 0.835260 0.839318 0.843320 0.847266 0.851153 0.854998 0.858815 0.862604 0.866363 0.870090 0.873784 0.877443 0.881066 0.884652 0.888198 0.891704 0.895167 0.898587 0.901962 0.905289 0.908569 0.911799 0.914977 0.918103 0.921174 0.924189 0.927147 0.930046 0.932885 0.935662 0.938376 0.941024 0.943606 0.946120 0.948565 0.950939 0.953240 0.955462 0.957599 0.959655 0.961632 0.963534 0.965362 0.967120 0.968810 0.970435 0.971997 0.973500 0.974946 0.976337 0.977677 0.978968 0.980214 0.981415 0.982576 0.983699 0.984787 0.985842 0.986868 0.987866 0.988840 0.989792 0.990726 0.991642 0.992546 0.993438 0.994323 0.995202 0.996078))
+(time 0)
+(channel blue)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.003922 -1.000000 -1.000000 0.121569 0.029810 -1.000000 -1.000000 0.247059 0.143778 -1.000000 -1.000000 0.372549 0.305764 -1.000000 -1.000000 0.498039 0.488796 -1.000000 -1.000000 0.623529 0.672134 -1.000000 -1.000000 0.749020 0.833704 -1.000000 -1.000000 0.874510 0.948010 -1.000000 -1.000000 1.000000 0.996078)
+ (n-samples 256)
+ (samples 256 0.003922 0.004065 0.004213 0.004369 0.004539 0.004725 0.004934 0.005168 0.005432 0.005731 0.006069 0.006450 0.006879 0.007360 0.007897 0.008494 0.009156 0.009887 0.010692 0.011575 0.012540 0.013591 0.014733 0.015970 0.017307 0.018747 0.020295 0.021956 0.023734 0.025632 0.027656 0.029810 0.032090 0.034487 0.036998 0.039619 0.042348 0.045179 0.048111 0.051140 0.054261 0.057472 0.060769 0.064149 0.067608 0.071143 0.074751 0.078427 0.082168 0.085971 0.089833 0.093750 0.097718 0.101734 0.105795 0.109897 0.114037 0.118211 0.122415 0.126647 0.130903 0.135179 0.139472 0.143778 0.148126 0.152545 0.157032 0.161585 0.166201 0.170878 0.175613 0.180405 0.185250 0.190146 0.195090 0.200081 0.205115 0.210190 0.215304 0.220454 0.225638 0.230853 0.236097 0.241368 0.246662 0.251977 0.257311 0.262662 0.268027 0.273403 0.278789 0.284180 0.289576 0.294974 0.300371 0.305764 0.311175 0.316625 0.322112 0.327634 0.333189 0.338776 0.344392 0.350035 0.355704 0.361397 0.367112 0.372846 0.378599 0.384367 0.390150 0.395945 0.401751 0.407565 0.413386 0.419212 0.425040 0.430869 0.436698 0.442523 0.448344 0.454158 0.459963 0.465758 0.471541 0.477310 0.483062 0.488796 0.494531 0.500286 0.506059 0.511847 0.517650 0.523464 0.529288 0.535119 0.540956 0.546797 0.552640 0.558482 0.564322 0.570157 0.575986 0.581806 0.587616 0.593414 0.599197 0.604963 0.610711 0.616438 0.622143 0.627823 0.633476 0.639101 0.644695 0.650256 0.655783 0.661273 0.666724 0.672134 0.677525 0.682917 0.688307 0.693695 0.699077 0.704451 0.709814 0.715165 0.720501 0.725819 0.731118 0.736394 0.741646 0.746872 0.752068 0.757234 0.762365 0.767460 0.772517 0.777534 0.782507 0.787435 0.792315 0.797145 0.801923 0.806646 0.811312 0.815918 0.820463 0.824944 0.829358 0.833704 0.838000 0.842268 0.846504 0.850707 0.854875 0.859008 0.863102 0.867156 0.871169 0.875139 0.879063 0.882941 0.886771 0.890550 0.894277 0.897951 0.901569 0.905130 0.908632 0.912074 0.915453 0.918768 0.922017 0.925199 0.928311 0.931352 0.934321 0.937214 0.940032 0.942772 0.945432 0.948010 0.950499 0.952894 0.955198 0.957414 0.959546 0.961595 0.963566 0.965461 0.967283 0.969035 0.970720 0.972342 0.973904 0.975407 0.976856 0.978254 0.979603 0.980906 0.982167 0.983389 0.984574 0.985726 0.986848 0.987942 0.989012 0.990061 0.991092 0.992107 0.993110 0.994105 0.995093 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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit e786138

Please sign in to comment.