git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2704 92316355-f0b4-4df1-b90c-862c8a59935fremotes/tiles
| @@ -137,6 +137,15 @@ int pipi_command(pipi_context_t *ctx, char const *cmd, ...) | |||||
| return -1; | return -1; | ||||
| ctx->images[ctx->nimages - 1]->wrap = 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")) | else if(!strcmp(cmd, "gray")) | ||||
| { | { | ||||
| if(ctx->nimages <= 0) | if(ctx->nimages <= 0) | ||||
| @@ -41,6 +41,11 @@ int main(int argc, char *argv[]) | |||||
| if(pipi_command(ctx, "gray") != 0) | if(pipi_command(ctx, "gray") != 0) | ||||
| return EXIT_FAILURE; | return EXIT_FAILURE; | ||||
| } | } | ||||
| else if(!strcmp(argv[0], "--autocontrast")) | |||||
| { | |||||
| if(pipi_command(ctx, "autocontrast") != 0) | |||||
| return EXIT_FAILURE; | |||||
| } | |||||
| else if(!strcmp(argv[0], "--wrap")) | else if(!strcmp(argv[0], "--wrap")) | ||||
| { | { | ||||
| if(pipi_command(ctx, "wrap") != 0) | if(pipi_command(ctx, "wrap") != 0) | ||||