to convert, display, mogrify, animate etc. It can already convert between
image formats (eg. "pipi src.png -o dest.jpeg").
git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2693 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
| @@ -9,6 +9,7 @@ Makefile.in | |||||
| Makefile | Makefile | ||||
| libtool | libtool | ||||
| pipi/pipi.pc | pipi/pipi.pc | ||||
| src/pipi | |||||
| genethumb/genethumb | genethumb/genethumb | ||||
| examples/blur | examples/blur | ||||
| examples/dither | examples/dither | ||||
| @@ -1,6 +1,6 @@ | |||||
| # $Id$ | # $Id$ | ||||
| SUBDIRS = pipi genethumb examples test | |||||
| SUBDIRS = pipi src genethumb examples test | |||||
| EXTRA_DIST = bootstrap common.h | EXTRA_DIST = bootstrap common.h | ||||
| AUTOMAKE_OPTIONS = dist-bzip2 | AUTOMAKE_OPTIONS = dist-bzip2 | ||||
| @@ -99,6 +99,7 @@ fi | |||||
| AC_CONFIG_FILES([ | AC_CONFIG_FILES([ | ||||
| Makefile | Makefile | ||||
| pipi/Makefile | pipi/Makefile | ||||
| src/Makefile | |||||
| genethumb/Makefile | genethumb/Makefile | ||||
| examples/Makefile | examples/Makefile | ||||
| test/Makefile | test/Makefile | ||||
| @@ -0,0 +1,9 @@ | |||||
| # $Id$ | |||||
| AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/pipi | |||||
| bin_PROGRAMS = pipi | |||||
| pipi_SOURCES = pipi.c $(GETOPT) | |||||
| pipi_LDADD = ../pipi/libpipi.la $(GETOPT_LIBS) | |||||
| @@ -0,0 +1,37 @@ | |||||
| #include "config.h" | |||||
| #include "common.h" | |||||
| #include <stdio.h> | |||||
| #include <stdlib.h> | |||||
| #include <string.h> | |||||
| #include <pipi.h> | |||||
| int main(int argc, char *argv[]) | |||||
| { | |||||
| pipi_context_t *ctx; | |||||
| ctx = pipi_create_context(); | |||||
| while(*++argv) | |||||
| { | |||||
| if(!strcmp(argv[0], "--output") || !strcmp(argv[0], "-o")) | |||||
| { | |||||
| if(argv[1] == NULL) | |||||
| return EXIT_FAILURE; | |||||
| if(pipi_command(ctx, "save", argv[1]) != 0) | |||||
| return EXIT_FAILURE; | |||||
| argv++; | |||||
| } | |||||
| else | |||||
| { | |||||
| if(pipi_command(ctx, "load", argv[0]) != 0) | |||||
| return EXIT_FAILURE; | |||||
| } | |||||
| } | |||||
| pipi_destroy_context(ctx); | |||||
| return EXIT_SUCCESS; | |||||
| } | |||||