Skip to content

Commit

Permalink
beautify: add bright red effect.
Browse files Browse the repository at this point in the history
  • Loading branch information
hejiann committed Jul 18, 2012
1 parent 3e8c919 commit 242df31
Show file tree
Hide file tree
Showing 5 changed files with 103 additions and 0 deletions.
1 change: 1 addition & 0 deletions README
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ beautify: add blues effect
beautify: add pink lady effect
beautify: add pick light effect
beautify: add purple fantasy effect
beautify: add bright red effect

2012-07-17
beautify: add impression effect
Expand Down
2 changes: 2 additions & 0 deletions beautify-textures.list
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ texture_pick_light_1
./textures/effects/pick-light-1.jpg
texture_pick_light_2
./textures/effects/pick-light-2.jpg
texture_bright_red
./textures/effects/bright-red.jpg
55 changes: 55 additions & 0 deletions beautify.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ typedef enum
BEAUTIFY_EFFECT_BLUES,
BEAUTIFY_EFFECT_PURPLE_FANTASY,

BEAUTIFY_EFFECT_BRIGHT_RED,
BEAUTIFY_EFFECT_CHRISTMAS_EVE,
BEAUTIFY_EFFECT_ASTRAL,
BEAUTIFY_EFFECT_PICK_LIGHT,
Expand Down Expand Up @@ -97,6 +98,7 @@ static const BeautifyEffectType advanced_effects[] =
BEAUTIFY_EFFECT_BLUES,
BEAUTIFY_EFFECT_PURPLE_FANTASY,

BEAUTIFY_EFFECT_BRIGHT_RED,
BEAUTIFY_EFFECT_CHRISTMAS_EVE,
BEAUTIFY_EFFECT_ASTRAL,
BEAUTIFY_EFFECT_PICK_LIGHT,
Expand Down Expand Up @@ -813,6 +815,9 @@ effect_icon_new (BeautifyEffectType effect)
case BEAUTIFY_EFFECT_PURPLE_FANTASY:
title = "Purple Fantasy";
break;
case BEAUTIFY_EFFECT_BRIGHT_RED:
title = "Bright Red";
break;
case BEAUTIFY_EFFECT_CHRISTMAS_EVE:
title = "Eve";
break;
Expand Down Expand Up @@ -1295,6 +1300,56 @@ do_effect (gint32 image, BeautifyEffectType effect)
gimp_curves_spline (effect_layer, GIMP_HISTOGRAM_BLUE, 18, blue_pts);
break;
}
case BEAUTIFY_EFFECT_BRIGHT_RED:
{
gint32 layer;
GdkPixbuf *pixbuf;

pixbuf = gdk_pixbuf_new_from_inline (-1, texture_bright_red, FALSE, NULL);
layer = gimp_layer_new_from_pixbuf (image, "texture", pixbuf, 100, GIMP_SCREEN_MODE, 0, 0);
gimp_image_insert_layer (image, layer, -1, 0);
gimp_layer_scale (layer, width, height, FALSE);
gimp_image_merge_down (image, layer, GIMP_CLIP_TO_BOTTOM_LAYER);

guint8 red_pts[] = {
0.000000 * 255, 0.001183 * 255,
0.121569 * 255, 0.131140 * 255,
0.247059 * 255, 0.353431 * 255,
0.372549 * 255, 0.538498 * 255,
0.498039 * 255, 0.690185 * 255,
0.623529 * 255, 0.804008 * 255,
0.749020 * 255, 0.900806 * 255,
0.874510 * 255, 0.988271 * 255,
1.000000 * 255, 1.000000 * 255,
};
guint8 green_pts[] = {
0.000000 * 255, 0.000098 * 255,
0.121569 * 255, 0.097098 * 255,
0.247059 * 255, 0.286323 * 255,
0.372549 * 255, 0.458654 * 255,
0.498039 * 255, 0.611045 * 255,
0.623529 * 255, 0.744221 * 255,
0.749020 * 255, 0.858522 * 255,
0.874510 * 255, 0.968540 * 255,
1.000000 * 255, 1.000000 * 255,
};
guint8 blue_pts[] = {
0.000000 * 255, 0.000369 * 255,
0.121569 * 255, 0.100320 * 255,
0.247059 * 255, 0.285806 * 255,
0.372549 * 255, 0.459693 * 255,
0.498039 * 255, 0.612676 * 255,
0.623529 * 255, 0.745027 * 255,
0.749020 * 255, 0.860280 * 255,
0.874510 * 255, 0.967918 * 255,
1.000000 * 255, 1.000000 * 255,
};
layer = gimp_image_get_active_layer (image);
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;
}
case BEAUTIFY_EFFECT_CHRISTMAS_EVE:
{
gint32 layer = gimp_layer_new (image, "color", width, height, GIMP_RGB_IMAGE, 100, GIMP_OVERLAY_MODE);
Expand Down
45 changes: 45 additions & 0 deletions curves/bright-red
Original file line number Diff line number Diff line change
@@ -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.001183 -1.000000 -1.000000 0.121569 0.131140 -1.000000 -1.000000 0.247059 0.353431 -1.000000 -1.000000 0.372549 0.538498 -1.000000 -1.000000 0.498039 0.690185 -1.000000 -1.000000 0.623529 0.804008 -1.000000 -1.000000 0.749020 0.900806 -1.000000 -1.000000 0.874510 0.988271 -1.000000 -1.000000 1.000000 1.000000)
(n-samples 256)
(samples 256 0.001183 0.004676 0.008174 0.011681 0.015200 0.018737 0.022296 0.025881 0.029497 0.033147 0.036837 0.040571 0.044352 0.048186 0.052077 0.056029 0.060047 0.064134 0.068295 0.072536 0.076859 0.081269 0.085772 0.090370 0.095069 0.099872 0.104785 0.109812 0.114956 0.120222 0.125616 0.131140 0.136832 0.142719 0.148789 0.155030 0.161432 0.167983 0.174671 0.181486 0.188416 0.195449 0.202575 0.209782 0.217058 0.224392 0.231774 0.239191 0.246632 0.254085 0.261541 0.268986 0.276411 0.283802 0.291150 0.298443 0.305668 0.312816 0.319875 0.326833 0.333679 0.340401 0.346989 0.353431 0.359776 0.366081 0.372347 0.378574 0.384762 0.390912 0.397023 0.403097 0.409134 0.415134 0.421097 0.427024 0.432916 0.438771 0.444592 0.450377 0.456128 0.461845 0.467529 0.473179 0.478795 0.484379 0.489931 0.495451 0.500939 0.506395 0.511821 0.517216 0.522581 0.527916 0.533222 0.538498 0.543746 0.548965 0.554155 0.559315 0.564446 0.569546 0.574616 0.579654 0.584661 0.589636 0.594579 0.599489 0.604366 0.609210 0.614019 0.618794 0.623535 0.628240 0.632909 0.637543 0.642140 0.646700 0.651223 0.655708 0.660155 0.664564 0.668934 0.673264 0.677555 0.681806 0.686016 0.690185 0.694305 0.698370 0.702381 0.706341 0.710251 0.714113 0.717930 0.721702 0.725432 0.729123 0.732774 0.736390 0.739971 0.743520 0.747038 0.750527 0.753990 0.757427 0.760842 0.764235 0.767610 0.770967 0.774308 0.777637 0.780954 0.784261 0.787560 0.790854 0.794143 0.797431 0.800719 0.804008 0.807287 0.810543 0.813775 0.816986 0.820176 0.823345 0.826494 0.829623 0.832735 0.835828 0.838904 0.841964 0.845009 0.848038 0.851053 0.854054 0.857043 0.860019 0.862984 0.865938 0.868883 0.871817 0.874744 0.877662 0.880573 0.883477 0.886376 0.889269 0.892158 0.895044 0.897926 0.900806 0.903712 0.906668 0.909667 0.912703 0.915772 0.918865 0.921978 0.925104 0.928237 0.931370 0.934499 0.937617 0.940718 0.943795 0.946843 0.949855 0.952826 0.955749 0.958619 0.961429 0.964173 0.966845 0.969439 0.971949 0.974368 0.976692 0.978913 0.981026 0.983024 0.984902 0.986653 0.988271 0.989766 0.991154 0.992437 0.993620 0.994706 0.995698 0.996600 0.997416 0.998148 0.998801 0.999377 0.999881 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))
(time 0)
(channel green)
(curve
(curve-type smooth)
(n-points 17)
(points 34 0.000000 0.000098 -1.000000 -1.000000 0.121569 0.097098 -1.000000 -1.000000 0.247059 0.286323 -1.000000 -1.000000 0.372549 0.458654 -1.000000 -1.000000 0.498039 0.611045 -1.000000 -1.000000 0.623529 0.744221 -1.000000 -1.000000 0.749020 0.858522 -1.000000 -1.000000 0.874510 0.968540 -1.000000 -1.000000 1.000000 1.000000)
(n-samples 256)
(samples 256 0.000098 0.002521 0.004948 0.007384 0.009833 0.012300 0.014788 0.017304 0.019850 0.022432 0.025053 0.027718 0.030433 0.033200 0.036024 0.038910 0.041863 0.044886 0.047984 0.051161 0.054423 0.057773 0.061215 0.064755 0.068396 0.072143 0.076001 0.079973 0.084064 0.088279 0.092622 0.097098 0.101734 0.106547 0.111530 0.116671 0.121962 0.127392 0.132953 0.138635 0.144428 0.150322 0.156309 0.162378 0.168520 0.174725 0.180983 0.187286 0.193624 0.199986 0.206364 0.212748 0.219128 0.225494 0.231838 0.238150 0.244419 0.250637 0.256793 0.262879 0.268884 0.274800 0.280616 0.286323 0.291966 0.297594 0.303209 0.308809 0.314395 0.319965 0.325521 0.331061 0.336585 0.342093 0.347585 0.353061 0.358519 0.363961 0.369384 0.374791 0.380179 0.385549 0.390900 0.396233 0.401546 0.406840 0.412115 0.417369 0.422604 0.427817 0.433010 0.438182 0.443333 0.448462 0.453569 0.458654 0.463718 0.468761 0.473785 0.478788 0.483772 0.488736 0.493680 0.498604 0.503509 0.508394 0.513259 0.518105 0.522932 0.527740 0.532528 0.537297 0.542047 0.546777 0.551489 0.556182 0.560856 0.565511 0.570148 0.574766 0.579365 0.583946 0.588508 0.593052 0.597577 0.602085 0.606574 0.611045 0.615497 0.619931 0.624345 0.628740 0.633117 0.637474 0.641813 0.646132 0.650433 0.654715 0.658978 0.663223 0.667449 0.671656 0.675844 0.680014 0.684165 0.688297 0.692411 0.696507 0.700584 0.704643 0.708683 0.712704 0.716708 0.720693 0.724660 0.728609 0.732539 0.736451 0.740345 0.744221 0.748072 0.751891 0.755680 0.759441 0.763174 0.766882 0.770564 0.774224 0.777861 0.781478 0.785075 0.788655 0.792217 0.795765 0.799298 0.802819 0.806328 0.809828 0.813319 0.816802 0.820280 0.823753 0.827223 0.830690 0.834157 0.837625 0.841095 0.844568 0.848046 0.851530 0.855022 0.858522 0.862060 0.865660 0.869314 0.873016 0.876760 0.880537 0.884343 0.888169 0.892009 0.895856 0.899704 0.903545 0.907373 0.911180 0.914961 0.918709 0.922415 0.926075 0.929681 0.933225 0.936702 0.940105 0.943426 0.946659 0.949798 0.952835 0.955763 0.958576 0.961267 0.963829 0.966256 0.968540 0.970694 0.972736 0.974670 0.976500 0.978229 0.979862 0.981400 0.982849 0.984212 0.985492 0.986692 0.987817 0.988871 0.989856 0.990776 0.991635 0.992436 0.993184 0.993881 0.994532 0.995139 0.995707 0.996239 0.996738 0.997209 0.997654 0.998078 0.998484 0.998876 0.999256 0.999630 1.000000))
(time 0)
(channel blue)
(curve
(curve-type smooth)
(n-points 17)
(points 34 0.000000 0.000369 -1.000000 -1.000000 0.121569 0.100320 -1.000000 -1.000000 0.247059 0.285806 -1.000000 -1.000000 0.372549 0.459693 -1.000000 -1.000000 0.498039 0.612676 -1.000000 -1.000000 0.623529 0.745027 -1.000000 -1.000000 0.749020 0.860280 -1.000000 -1.000000 0.874510 0.967918 -1.000000 -1.000000 1.000000 1.000000)
(n-samples 256)
(samples 256 0.000369 0.002941 0.005516 0.008100 0.010696 0.013309 0.015942 0.018599 0.021285 0.024003 0.026758 0.029554 0.032395 0.035285 0.038228 0.041228 0.044289 0.047415 0.050611 0.053880 0.057226 0.060655 0.064168 0.067772 0.071469 0.075265 0.079162 0.083165 0.087278 0.091506 0.095852 0.100320 0.104934 0.109709 0.114637 0.119709 0.124916 0.130251 0.135704 0.141268 0.146933 0.152691 0.158535 0.164454 0.170441 0.176488 0.182585 0.188725 0.194899 0.201098 0.207314 0.213539 0.219763 0.225979 0.232178 0.238352 0.244491 0.250588 0.256635 0.262622 0.268541 0.274383 0.280141 0.285806 0.291420 0.297031 0.302638 0.308240 0.313836 0.319426 0.325009 0.330583 0.336149 0.341704 0.347249 0.352782 0.358302 0.363810 0.369303 0.374781 0.380243 0.385689 0.391117 0.396526 0.401916 0.407286 0.412636 0.417963 0.423268 0.428549 0.433805 0.439037 0.444242 0.449420 0.454571 0.459693 0.464790 0.469866 0.474922 0.479957 0.484972 0.489966 0.494939 0.499892 0.504825 0.509737 0.514628 0.519499 0.524350 0.529181 0.533991 0.538780 0.543550 0.548299 0.553028 0.557737 0.562426 0.567094 0.571743 0.576371 0.580979 0.585567 0.590135 0.594683 0.599211 0.603720 0.608208 0.612676 0.617123 0.621546 0.625946 0.630324 0.634679 0.639013 0.643325 0.647615 0.651885 0.656133 0.660362 0.664570 0.668759 0.672928 0.677078 0.681210 0.685323 0.689418 0.693495 0.697554 0.701597 0.705623 0.709632 0.713625 0.717602 0.721564 0.725511 0.729442 0.733359 0.737262 0.741152 0.745027 0.748883 0.752714 0.756521 0.760304 0.764065 0.767804 0.771522 0.775221 0.778900 0.782562 0.786206 0.789834 0.793446 0.797044 0.800627 0.804198 0.807757 0.811304 0.814842 0.818369 0.821888 0.825400 0.828904 0.832403 0.835896 0.839386 0.842871 0.846355 0.849836 0.853317 0.856798 0.860280 0.863791 0.867355 0.870965 0.874616 0.878300 0.882013 0.885746 0.889496 0.893254 0.897016 0.900774 0.904522 0.908255 0.911966 0.915649 0.919297 0.922905 0.926466 0.929974 0.933422 0.936805 0.940117 0.943350 0.946500 0.949558 0.952521 0.955380 0.958131 0.960766 0.963280 0.965666 0.967918 0.970046 0.972068 0.973985 0.975802 0.977522 0.979149 0.980686 0.982136 0.983504 0.984792 0.986004 0.987143 0.988213 0.989217 0.990159 0.991042 0.991870 0.992646 0.993374 0.994057 0.994698 0.995301 0.995869 0.996407 0.996916 0.997402 0.997867 0.998314 0.998748 0.999171 0.999587 1.000000))
(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
Binary file added textures/effects/bright-red.jpg
Loading
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 242df31

Please sign in to comment.