26 lines
476 B
C
26 lines
476 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include "img_png.h"
|
|
|
|
int main(int argc, char** argv) {
|
|
if(argc != 2) {
|
|
fprintf(stderr, "Usage: ./imgvwr FILE\n");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
FILE* fp_image = fopen(argv[1], "rb");
|
|
if(!fp_image) {
|
|
perror("Failed to open image!");
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
|
|
/*if(!img_png_decode(fp_image)) {
|
|
fprintf(stderr, "Could not parse PNG file!\n");
|
|
exit(EXIT_FAILURE);
|
|
}*/
|
|
|
|
img_png_decode(fp_image);
|
|
|
|
return 0;
|
|
}
|