source: libpipi/trunk/examples/img2rubik.c @ 2694

Last change on this file since 2694 was 2679, checked in by Sam Hocevar, 15 years ago
  • Get rid of test.c, it was no longer useful anyway.
File size: 486 bytes
Line 
1#include "config.h"
2#include "common.h"
3
4#include <stdio.h>
5#include <stdlib.h>
6#include <string.h>
7
8#include <pipi.h>
9
10int main(int argc, char *argv[])
11{
12    char *srcname = NULL, *dstname = NULL;
13    pipi_image_t *img;
14
15    if(argc < 3)
16    {
17        fprintf(stderr, "%s: too few arguments\n", argv[0]);
18        return EXIT_FAILURE;
19    }
20
21    srcname = argv[1];
22    dstname = argv[2];
23
24    img = pipi_load(srcname);
25    pipi_save(img, dstname);
26    pipi_free(img);
27
28    return 0;
29}
30
Note: See TracBrowser for help on using the repository browser.