Browse Source

* Start working on "pipi", a command-line libpipi tool. It will be similar

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
sam 16 years ago
parent
commit
0549f43287
5 changed files with 49 additions and 1 deletions
  1. +1
    -0
      .gitignore
  2. +1
    -1
      Makefile.am
  3. +1
    -0
      configure.ac
  4. +9
    -0
      src/Makefile.am
  5. +37
    -0
      src/pipi.c

+ 1
- 0
.gitignore View File

@@ -9,6 +9,7 @@ Makefile.in
Makefile
libtool
pipi/pipi.pc
src/pipi
genethumb/genethumb
examples/blur
examples/dither


+ 1
- 1
Makefile.am View File

@@ -1,6 +1,6 @@
# $Id$

SUBDIRS = pipi genethumb examples test
SUBDIRS = pipi src genethumb examples test

EXTRA_DIST = bootstrap common.h
AUTOMAKE_OPTIONS = dist-bzip2


+ 1
- 0
configure.ac View File

@@ -99,6 +99,7 @@ fi
AC_CONFIG_FILES([
Makefile
pipi/Makefile
src/Makefile
genethumb/Makefile
examples/Makefile
test/Makefile


+ 9
- 0
src/Makefile.am View File

@@ -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)


+ 37
- 0
src/pipi.c View File

@@ -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;
}


Loading…
Cancel
Save