30 lines
550 B
C
30 lines
550 B
C
#include "config.h"
|
|
#include "hvif-light.h"
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
int
|
|
main(void)
|
|
{
|
|
puts("This is " PACKAGE_STRING ".");
|
|
|
|
FILE* imagefile = fopen("test.hvif", "r");
|
|
if (!imagefile) {
|
|
fputs("fopen failed.\n", stderr);
|
|
return EXIT_FAILURE;
|
|
}
|
|
|
|
hvif_result result = hvif_from_file(imagefile);
|
|
if (!result.success) {
|
|
fputs("Reading image failed.\n", stderr);
|
|
fputs(result.error, stderr);
|
|
fputc('\n', stderr);
|
|
return EXIT_FAILURE;
|
|
}
|
|
puts("Reading image succeeded.");
|
|
hvif_free(result.image);
|
|
|
|
return EXIT_SUCCESS;
|
|
}
|