Ignore:
Timestamp:
Aug 11, 2008, 2:51:05 AM (14 years ago)
Author:
Sam Hocevar
Message:
  • context.c: implement various dithering commands and Gaussian blur.
  • pipi.c: add "--blur" and "--dither" commandline options.
  • blur.c dither.c: remove these examples, pipi.c works a lot better:

pipi src.png --blur 10 dest.png
pipi src.png --dither dbs dest.png

(and of course combinations are possible)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libpipi/trunk/src/pipi.c

    r2693 r2694  
    1616    while(*++argv)
    1717    {
    18         if(!strcmp(argv[0], "--output") || !strcmp(argv[0], "-o"))
     18        if(!strcmp(argv[0], "--dup"))
     19        {
     20            if(pipi_command(ctx, "dup") != 0)
     21                return EXIT_FAILURE;
     22        }
     23        else if(!strcmp(argv[0], "--dither"))
     24        {
     25            if(argv[1] == NULL)
     26                return EXIT_FAILURE;
     27            if(pipi_command(ctx, "dither", argv[1]) != 0)
     28                return EXIT_FAILURE;
     29            argv++;
     30        }
     31        else if(!strcmp(argv[0], "--blur"))
     32        {
     33            if(argv[1] == NULL)
     34                return EXIT_FAILURE;
     35            if(pipi_command(ctx, "blur", argv[1]) != 0)
     36                return EXIT_FAILURE;
     37            argv++;
     38        }
     39        else if(!strcmp(argv[0], "--output") || !strcmp(argv[0], "-o"))
    1940        {
    2041            if(argv[1] == NULL)
Note: See TracChangeset for help on using the changeset viewer.