Permalink
Browse files

beautify: add color pencil effect.

  • Loading branch information...
1 parent c18a715 commit 592ca4613f60adfa5bdde64bb8524d67b510ca05 @hejiann committed Jul 30, 2012
Showing with 27 additions and 1 deletion.
  1. +1 −0 README
  2. +19 −0 beautify-effect.c
  3. +1 −1 beautify-effect.h
  4. +2 −0 beautify-textures.list
  5. +4 −0 beautify.c
  6. BIN textures/effects/color-pencil.jpg
View
@@ -48,6 +48,7 @@ CHANGELOG
beautify: fix missing effect.
beautify: add glass drops effect.
beautify: add life sketch effect.
+beautify: add color pencil effect.
2012-07-29
texture-border: add custom texures support.
View
@@ -1549,6 +1549,25 @@ run_effect (gint32 image_ID, BeautifyEffectType effect)
break;
}
+ case BEAUTIFY_EFFECT_COLOR_PENCIL:
+ {
+ gint32 layer;
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_new_from_inline (-1, texture_color_pencil, FALSE, NULL);
+
+ layer = gimp_layer_new_from_pixbuf (image_ID, "texture", pixbuf, 100, GIMP_SCREEN_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);
+
+ layer = gimp_layer_new_from_pixbuf (image_ID, "texture", pixbuf, 100, GIMP_OVERLAY_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_BEAM_GRADIENT:
{
guint8 red_pts[] = {
View
@@ -90,7 +90,7 @@ typedef enum
BEAUTIFY_EFFECT_SKETCH,
BEAUTIFY_EFFECT_LIFE_SKETCH,
BEAUTIFY_EFFECT_CLASSIC_SKETCH, // TODO
- BEAUTIFY_EFFECT_COLOR_PENCIL, // TODO
+ BEAUTIFY_EFFECT_COLOR_PENCIL,
BEAUTIFY_EFFECT_TV_LINES, // TODO
BEAUTIFY_EFFECT_BLACK_AND_WHITE_NEWSPAPER, // TODO
BEAUTIFY_EFFECT_RELIEF, // TODO
@@ -26,6 +26,8 @@ texture_life_sketch_1
./textures/effects/life-sketch-1.jpg
texture_life_sketch_2
./textures/effects/life-sketch-2.jpg
+texture_color_pencil
+ ./textures/effects/color-pencil.jpg
texture_beam_gradient
./textures/effects/beam-gradient.png
texture_pink_blue_gradient
View
@@ -104,6 +104,7 @@ static const BeautifyEffectType art_effects[] =
{
BEAUTIFY_EFFECT_SKETCH,
BEAUTIFY_EFFECT_LIFE_SKETCH,
+ BEAUTIFY_EFFECT_COLOR_PENCIL,
};
static const BeautifyEffectType gradient_effects[] =
@@ -1051,6 +1052,9 @@ effect_icon_new (BeautifyEffectType effect)
case BEAUTIFY_EFFECT_LIFE_SKETCH:
title = "Life Sketch";
break;
+ case BEAUTIFY_EFFECT_COLOR_PENCIL:
+ title = "Color Pencil";
+ break;
case BEAUTIFY_EFFECT_BEAM_GRADIENT:
title = "Beam Gradient";
break;
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 592ca46

Please sign in to comment.