Permalink
Browse files

beautify: add retro LOMO effect.

  • Loading branch information...
1 parent 457c42a commit 3e3261126e65ce896f15ab53a24700015efc3eb1 @hejiann committed Jul 20, 2012
Showing with 91 additions and 0 deletions.
  1. +1 −0 README
  2. +40 −0 beautify-effect.c
  3. +1 −0 beautify-effect.h
  4. +4 −0 beautify.c
  5. +45 −0 curves/retro-LOMO
View
1 README
@@ -38,6 +38,7 @@ beautify: add HDR effect
provide make userinstall to install the plugin into user directory
add make uninstall and make useruninstall
beautify: add black and white effect
+beautify: add retro LOMO effect
2012-07-19
beautify: fix memory leak
View
@@ -142,6 +142,46 @@ run_effect (gint32 image_ID, BeautifyEffectType effect)
case BEAUTIFY_EFFECT_INVERT:
gimp_invert (effect_layer);
break;
+ case BEAUTIFY_EFFECT_RETRO_LOMO:
+ {
+ guint8 red_pts[] = {
+ 0.000000 * 255, 0.009477 * 255,
+ 0.121569 * 255, 0.066342 * 255,
+ 0.247059 * 255, 0.211570 * 255,
+ 0.372549 * 255, 0.391796 * 255,
+ 0.498039 * 255, 0.576389 * 255,
+ 0.623529 * 255, 0.745091 * 255,
+ 0.749020 * 255, 0.875015 * 255,
+ 0.874510 * 255, 0.959604 * 255,
+ 1.000000 * 255, 0.989234 * 255,
+ };
+ guint8 green_pts[] = {
+ 0.000000 * 255, 0.075980 * 255,
+ 0.121569 * 255, 0.176692 * 255,
+ 0.247059 * 255, 0.294329 * 255,
+ 0.372549 * 255, 0.415297 * 255,
+ 0.498039 * 255, 0.536491 * 255,
+ 0.623529 * 255, 0.651230 * 255,
+ 0.749020 * 255, 0.751355 * 255,
+ 0.874510 * 255, 0.843675 * 255,
+ 1.000000 * 255, 0.921772 * 255,
+ };
+ guint8 blue_pts[] = {
+ 0.000000 * 255, 0.246068 * 255,
+ 0.121569 * 255, 0.310134 * 255,
+ 0.247059 * 255, 0.373558 * 255,
+ 0.372549 * 255, 0.435251 * 255,
+ 0.498039 * 255, 0.503361 * 255,
+ 0.623529 * 255, 0.565592 * 255,
+ 0.749020 * 255, 0.629995 * 255,
+ 0.874510 * 255, 0.690267 * 255,
+ 1.000000 * 255, 0.751997 * 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);
+ break;
+ }
case BEAUTIFY_EFFECT_GOTHIC_STYLE:
{
guint8 red_pts[] = {
View
@@ -26,6 +26,7 @@ typedef enum
BEAUTIFY_EFFECT_BLACK_AND_WHITE,
BEAUTIFY_EFFECT_INVERT,
+ BEAUTIFY_EFFECT_RETRO_LOMO,
BEAUTIFY_EFFECT_GOTHIC_STYLE,
BEAUTIFY_EFFECT_HDR,
BEAUTIFY_EFFECT_CLASSIC_HDR,
View
@@ -52,6 +52,7 @@ static const BeautifyEffectType basic_effects[] =
static const BeautifyEffectType lomo_effects[] =
{
+ BEAUTIFY_EFFECT_RETRO_LOMO,
BEAUTIFY_EFFECT_GOTHIC_STYLE,
BEAUTIFY_EFFECT_HDR,
BEAUTIFY_EFFECT_CLASSIC_HDR,
@@ -811,6 +812,9 @@ effect_icon_new (BeautifyEffectType effect)
case BEAUTIFY_EFFECT_INVERT:
title = "Invert";
break;
+ case BEAUTIFY_EFFECT_RETRO_LOMO:
+ title = "Retro LOMO";
+ break;
case BEAUTIFY_EFFECT_GOTHIC_STYLE:
title = "Gothic Style";
break;
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 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.009477 -1.000000 -1.000000 0.121569 0.066342 -1.000000 -1.000000 0.247059 0.211570 -1.000000 -1.000000 0.372549 0.391796 -1.000000 -1.000000 0.498039 0.576389 -1.000000 -1.000000 0.623529 0.745091 -1.000000 -1.000000 0.749020 0.875015 -1.000000 -1.000000 0.874510 0.959604 -1.000000 -1.000000 1.000000 0.989234)
+ (n-samples 256)
+ (samples 256 0.009477 0.010625 0.011778 0.012939 0.014113 0.015304 0.016517 0.017755 0.019024 0.020327 0.021668 0.023052 0.024483 0.025966 0.027505 0.029103 0.030766 0.032497 0.034302 0.036183 0.038146 0.040195 0.042334 0.044567 0.046899 0.049333 0.051875 0.054528 0.057297 0.060186 0.063200 0.066342 0.069615 0.073016 0.076539 0.080181 0.083937 0.087802 0.091772 0.095841 0.100006 0.104262 0.108604 0.113028 0.117528 0.122101 0.126742 0.131446 0.136209 0.141026 0.145893 0.150804 0.155756 0.160743 0.165761 0.170806 0.175873 0.180958 0.186055 0.191160 0.196268 0.201376 0.206478 0.211570 0.216687 0.221865 0.227101 0.232394 0.237739 0.243134 0.248576 0.254063 0.259592 0.265159 0.270763 0.276400 0.282067 0.287761 0.293481 0.299223 0.304984 0.310761 0.316552 0.322353 0.328163 0.333978 0.339795 0.345612 0.351426 0.357234 0.363032 0.368820 0.374592 0.380348 0.386083 0.391796 0.397508 0.403242 0.408997 0.414770 0.420559 0.426364 0.432181 0.438010 0.443847 0.449692 0.455543 0.461397 0.467253 0.473109 0.478963 0.484813 0.490657 0.496494 0.502322 0.508139 0.513942 0.519731 0.525503 0.531256 0.536988 0.542699 0.548385 0.554045 0.559678 0.565280 0.570851 0.576389 0.581912 0.587440 0.592971 0.598502 0.604032 0.609558 0.615078 0.620591 0.626093 0.631584 0.637060 0.642520 0.647962 0.653384 0.658782 0.664157 0.669504 0.674823 0.680111 0.685366 0.690586 0.695769 0.700912 0.706015 0.711073 0.716086 0.721052 0.725967 0.730831 0.735641 0.740395 0.745091 0.749741 0.754359 0.758945 0.763497 0.768015 0.772499 0.776948 0.781361 0.785738 0.790078 0.794380 0.798645 0.802871 0.807057 0.811204 0.815310 0.819375 0.823399 0.827380 0.831318 0.835213 0.839064 0.842870 0.846630 0.850345 0.854014 0.857635 0.861209 0.864734 0.868211 0.871638 0.875015 0.878349 0.881648 0.884909 0.888134 0.891320 0.894466 0.897573 0.900638 0.903661 0.906642 0.909579 0.912471 0.915318 0.918119 0.920873 0.923578 0.926234 0.928841 0.931397 0.933901 0.936352 0.938751 0.941095 0.943384 0.945616 0.947792 0.949911 0.951970 0.953970 0.955910 0.957788 0.959604 0.961349 0.963016 0.964607 0.966125 0.967573 0.968953 0.970268 0.971520 0.972711 0.973845 0.974923 0.975948 0.976923 0.977850 0.978732 0.979571 0.980370 0.981131 0.981857 0.982551 0.983214 0.983849 0.984459 0.985047 0.985614 0.986164 0.986699 0.987221 0.987733 0.988238 0.988737 0.989234))
+(time 0)
+(channel green)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.075980 -1.000000 -1.000000 0.121569 0.176692 -1.000000 -1.000000 0.247059 0.294329 -1.000000 -1.000000 0.372549 0.415297 -1.000000 -1.000000 0.498039 0.536491 -1.000000 -1.000000 0.623529 0.651230 -1.000000 -1.000000 0.749020 0.751355 -1.000000 -1.000000 0.874510 0.843675 -1.000000 -1.000000 1.000000 0.921772)
+ (n-samples 256)
+ (samples 256 0.075980 0.079120 0.082261 0.085404 0.088548 0.091695 0.094846 0.098000 0.101160 0.104324 0.107495 0.110673 0.113858 0.117051 0.120253 0.123465 0.126686 0.129919 0.133163 0.136419 0.139688 0.142971 0.146268 0.149580 0.152907 0.156251 0.159611 0.162989 0.166386 0.169801 0.173237 0.176692 0.180169 0.183669 0.187189 0.190730 0.194290 0.197868 0.201464 0.205077 0.208705 0.212348 0.216004 0.219674 0.223355 0.227047 0.230750 0.234461 0.238181 0.241908 0.245641 0.249380 0.253123 0.256870 0.260619 0.264370 0.268122 0.271874 0.275624 0.279373 0.283119 0.286861 0.290598 0.294329 0.298060 0.301798 0.305541 0.309289 0.313043 0.316801 0.320564 0.324331 0.328103 0.331878 0.335656 0.339438 0.343223 0.347010 0.350799 0.354591 0.358384 0.362179 0.365974 0.369771 0.373568 0.377366 0.381164 0.384961 0.388758 0.392554 0.396349 0.400142 0.403934 0.407724 0.411512 0.415297 0.419084 0.422877 0.426676 0.430480 0.434287 0.438099 0.441914 0.445731 0.449550 0.453370 0.457191 0.461012 0.464832 0.468651 0.472468 0.476283 0.480095 0.483903 0.487707 0.491506 0.495300 0.499087 0.502868 0.506641 0.510407 0.514163 0.517911 0.521649 0.525377 0.529093 0.532798 0.536491 0.540178 0.543866 0.547554 0.551242 0.554929 0.558613 0.562294 0.565972 0.569646 0.573314 0.576977 0.580633 0.584282 0.587923 0.591555 0.595177 0.598790 0.602391 0.605980 0.609557 0.613120 0.616670 0.620205 0.623724 0.627227 0.630713 0.634181 0.637631 0.641062 0.644472 0.647862 0.651230 0.654577 0.657903 0.661210 0.664498 0.667768 0.671019 0.674254 0.677472 0.680674 0.683860 0.687032 0.690190 0.693335 0.696466 0.699586 0.702694 0.705791 0.708877 0.711954 0.715022 0.718081 0.721133 0.724177 0.727215 0.730247 0.733273 0.736295 0.739313 0.742327 0.745338 0.748347 0.751355 0.754361 0.757365 0.760367 0.763366 0.766361 0.769351 0.772337 0.775317 0.778291 0.781259 0.784219 0.787172 0.790116 0.793051 0.795976 0.798892 0.801796 0.804690 0.807571 0.810440 0.813295 0.816137 0.818965 0.821778 0.824575 0.827357 0.830121 0.832869 0.835599 0.838310 0.841002 0.843675 0.846327 0.848960 0.851572 0.854166 0.856742 0.859300 0.861841 0.864366 0.866875 0.869369 0.871849 0.874316 0.876769 0.879210 0.881639 0.884057 0.886465 0.888862 0.891251 0.893632 0.896004 0.898369 0.900728 0.903081 0.905429 0.907772 0.910111 0.912447 0.914781 0.917112 0.919442 0.921772))
+(time 0)
+(channel blue)
+(curve
+ (curve-type smooth)
+ (n-points 17)
+ (points 34 0.000000 0.246068 -1.000000 -1.000000 0.121569 0.310134 -1.000000 -1.000000 0.247059 0.373558 -1.000000 -1.000000 0.372549 0.435251 -1.000000 -1.000000 0.498039 0.503361 -1.000000 -1.000000 0.623529 0.565592 -1.000000 -1.000000 0.749020 0.629995 -1.000000 -1.000000 0.874510 0.690267 -1.000000 -1.000000 1.000000 0.751997)
+ (n-samples 256)
+ (samples 256 0.246068 0.248156 0.250244 0.252332 0.254419 0.256506 0.258592 0.260677 0.262762 0.264845 0.266927 0.269008 0.271087 0.273165 0.275241 0.277315 0.279387 0.281457 0.283524 0.285589 0.287652 0.289712 0.291769 0.293823 0.295874 0.297922 0.299967 0.302008 0.304045 0.306079 0.308108 0.310134 0.312156 0.314174 0.316190 0.318201 0.320210 0.322216 0.324218 0.326218 0.328215 0.330209 0.332200 0.334189 0.336176 0.338160 0.340141 0.342121 0.344098 0.346073 0.348047 0.350018 0.351987 0.353955 0.355922 0.357886 0.359849 0.361811 0.363772 0.365731 0.367689 0.369646 0.371603 0.373558 0.375508 0.377450 0.379383 0.381309 0.383228 0.385141 0.387049 0.388953 0.390852 0.392749 0.394644 0.396538 0.398430 0.400323 0.402217 0.404112 0.406009 0.407909 0.409814 0.411722 0.413636 0.415556 0.417483 0.419417 0.421360 0.423311 0.425272 0.427244 0.429227 0.431222 0.433230 0.435251 0.437288 0.439342 0.441413 0.443498 0.445597 0.447708 0.449832 0.451965 0.454108 0.456259 0.458417 0.460581 0.462749 0.464921 0.467096 0.469272 0.471449 0.473624 0.475798 0.477968 0.480135 0.482295 0.484450 0.486596 0.488734 0.490863 0.492980 0.495085 0.497176 0.499254 0.501316 0.503361 0.505391 0.507408 0.509413 0.511406 0.513389 0.515362 0.517326 0.519281 0.521229 0.523169 0.525104 0.527033 0.528957 0.530877 0.532794 0.534708 0.536621 0.538532 0.540443 0.542355 0.544267 0.546182 0.548099 0.550019 0.551944 0.553873 0.555808 0.557749 0.559698 0.561654 0.563618 0.565592 0.567575 0.569565 0.571563 0.573567 0.575577 0.577592 0.579612 0.581637 0.583665 0.585696 0.587730 0.589766 0.591803 0.593840 0.595878 0.597916 0.599953 0.601988 0.604021 0.606051 0.608078 0.610101 0.612120 0.614134 0.616142 0.618144 0.620139 0.622127 0.624108 0.626079 0.628042 0.629995 0.631938 0.633873 0.635799 0.637717 0.639627 0.641531 0.643428 0.645319 0.647205 0.649086 0.650963 0.652835 0.654705 0.656571 0.658436 0.660298 0.662159 0.664019 0.665879 0.667740 0.669601 0.671463 0.673327 0.675193 0.677062 0.678935 0.680811 0.682691 0.684577 0.686468 0.688364 0.690267 0.692174 0.694084 0.695995 0.697908 0.699824 0.701741 0.703659 0.705580 0.707502 0.709425 0.711351 0.713277 0.715205 0.717134 0.719064 0.720995 0.722928 0.724861 0.726796 0.728731 0.730667 0.732604 0.734541 0.736479 0.738418 0.740357 0.742296 0.744236 0.746176 0.748116 0.750057 0.751997))
+(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

0 comments on commit 3e32611

Please sign in to comment.