Bläddra i källkod

* Support --autocontrast in pipi.

git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2704 92316355-f0b4-4df1-b90c-862c8a59935f
remotes/tiles
sam 16 år sedan
förälder
incheckning
31fd250bd2
2 ändrade filer med 14 tillägg och 0 borttagningar
  1. +9
    -0
      pipi/context.c
  2. +5
    -0
      src/pipi.c

+ 9
- 0
pipi/context.c Visa fil

@@ -137,6 +137,15 @@ int pipi_command(pipi_context_t *ctx, char const *cmd, ...)
return -1;
ctx->images[ctx->nimages - 1]->wrap = 1;
}
else if(!strcmp(cmd, "autocontrast"))
{
pipi_image_t *tmp;
if(ctx->nimages <= 0)
return -1;
tmp = ctx->images[ctx->nimages - 1];
ctx->images[ctx->nimages - 1] = pipi_autocontrast(tmp);
pipi_free(tmp);
}
else if(!strcmp(cmd, "gray"))
{
if(ctx->nimages <= 0)


+ 5
- 0
src/pipi.c Visa fil

@@ -41,6 +41,11 @@ int main(int argc, char *argv[])
if(pipi_command(ctx, "gray") != 0)
return EXIT_FAILURE;
}
else if(!strcmp(argv[0], "--autocontrast"))
{
if(pipi_command(ctx, "autocontrast") != 0)
return EXIT_FAILURE;
}
else if(!strcmp(argv[0], "--wrap"))
{
if(pipi_command(ctx, "wrap") != 0)


Laddar…
Avbryt
Spara