git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2604 92316355-f0b4-4df1-b90c-862c8a59935fremotes/tiles
@@ -10,6 +10,7 @@ Makefile | |||||
libtool | libtool | ||||
pipi/pipi.pc | pipi/pipi.pc | ||||
genethumb/genethumb | genethumb/genethumb | ||||
examples/blur | |||||
examples/img2rubik | examples/img2rubik | ||||
stamp-h1 | stamp-h1 | ||||
.auto | .auto | ||||
@@ -2,7 +2,10 @@ | |||||
AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/pipi | AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/pipi | ||||
bin_PROGRAMS = img2rubik | |||||
bin_PROGRAMS = img2rubik blur | |||||
blur_SOURCES = blur.c | |||||
blur_LDADD = ../pipi/libpipi.la | |||||
img2rubik_SOURCES = img2rubik.c | img2rubik_SOURCES = img2rubik.c | ||||
img2rubik_LDADD = ../pipi/libpipi.la | img2rubik_LDADD = ../pipi/libpipi.la | ||||
@@ -0,0 +1,34 @@ | |||||
#include "config.h" | |||||
#include "common.h" | |||||
#include <stdio.h> | |||||
#include <stdlib.h> | |||||
#include <string.h> | |||||
#include <pipi.h> | |||||
int main(int argc, char *argv[]) | |||||
{ | |||||
char *srcname = NULL, *dstname = NULL; | |||||
pipi_image_t *img, *newimg; | |||||
if(argc < 3) | |||||
{ | |||||
fprintf(stderr, "%s: too few arguments\n", argv[0]); | |||||
fprintf(stderr, "Usage: %s <src> <radius> <dest>\n", argv[0]); | |||||
return EXIT_FAILURE; | |||||
} | |||||
srcname = argv[1]; | |||||
dstname = argv[3]; | |||||
img = pipi_load(srcname); | |||||
newimg = pipi_gaussian_blur(img, atof(argv[2])); | |||||
pipi_free(img); | |||||
pipi_save(newimg, dstname); | |||||
pipi_free(newimg); | |||||
return 0; | |||||
} | |||||