|
- #include "config.h"
- #include "common.h"
-
- #include <stdio.h>
- #include <stdlib.h>
- #include <string.h>
- #include <math.h>
-
- #include <pipi.h>
-
- int main(int argc, char *argv[])
- {
- static double const mypal[] =
- {
- 0.900, 0.001, 0.001, /* red */
- 0.001, 0.800, 0.001, /* green */
- 0.005, 0.001, 0.500, /* blue */
- 0.900, 0.900, 0.900, /* white */
- 0.900, 0.900, 0.001, /* yellow */
- 0.800, 0.400, 0.001, /* orange */
- };
-
- pipi_image_t *src = pipi_load(argv[1]);
- pipi_image_t *dst = pipi_reduce(src, 6, mypal);
- pipi_save(dst, argv[2]);
-
- return 0;
- }
|