Browse Source

* Allow pipi --blur to specify both the X and Y Gaussian sizes. Now we can

create some nice, tileable brushed metal textures:
        pipi pipi:random15x15 --geometry 512x512 --wrap --blur 40 \
             pipi:random512x512 --wrap --blur 10x0 --autocontrast --wrap \
             --blur 20x0 --multiply -o image.png

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2713 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 years ago
parent
commit
3bcf099f65
1 changed files with 6 additions and 1 deletions
  1. +6
    -1
      pipi/context.c

+ 6
- 1
pipi/context.c View File

@@ -118,14 +118,19 @@ int pipi_command(pipi_context_t *ctx, char const *cmd, ...)
pipi_image_t *src, *dst;
char const *arg;
va_list ap;
double w, h;

if(ctx->nimages < 1)
return -1;
va_start(ap, cmd);
arg = va_arg(ap, char const *);
va_end(ap);
w = h = atof(arg);
arg = strchr(arg, 'x');
if(arg)
h = atof(arg + 1);
src = ctx->images[ctx->nimages - 1];
dst = pipi_gaussian_blur(src, atof(arg));
dst = pipi_gaussian_blur_ext(src, w, h, 0.0, 0.0);
if(dst == NULL)
return -1;
pipi_free(src);


Loading…
Cancel
Save