2016-11-14 18:56:24 +01:00
|
|
|
#include <stdio.h>
|
2017-02-25 10:17:33 +01:00
|
|
|
#include <stdlib.h>
|
2019-12-23 18:48:19 +01:00
|
|
|
#include "../caesium/caesium.h"
|
2017-02-25 10:17:33 +01:00
|
|
|
#include "config.h"
|
2016-11-04 11:00:04 +01:00
|
|
|
|
2016-11-14 18:56:24 +01:00
|
|
|
int main(int argc, char *argv[])
|
2016-11-04 11:00:04 +01:00
|
|
|
{
|
2017-06-03 12:22:23 +02:00
|
|
|
fprintf(stdout, "libcaesium demo application v%d.%d.%d\n",
|
2017-02-25 10:17:33 +01:00
|
|
|
VERSION_MAJOR,
|
|
|
|
VERSION_MINOR,
|
|
|
|
VERSION_PATCH);
|
|
|
|
|
2016-11-14 18:56:24 +01:00
|
|
|
if (argc != 3) {
|
|
|
|
fprintf(stderr, "Wrong arguments.\nExiting.\n");
|
2017-02-25 10:17:33 +01:00
|
|
|
exit(EXIT_FAILURE);
|
2016-11-14 18:56:24 +01:00
|
|
|
}
|
2017-02-25 10:17:33 +01:00
|
|
|
|
2016-11-13 14:43:54 +01:00
|
|
|
cs_image_pars options = initialize_parameters();
|
2019-12-23 18:48:19 +01:00
|
|
|
int error_code = 0;
|
|
|
|
cs_compress(argv[1], argv[2], &options, &error_code);
|
2016-11-14 18:56:24 +01:00
|
|
|
|
2019-12-23 18:48:19 +01:00
|
|
|
exit(error_code);
|
2016-11-04 11:00:04 +01:00
|
|
|
}
|