Initial commit
This commit is contained in:
parent
47b35201bd
commit
f0434c3de9
6
img_png.h
Normal file
6
img_png.h
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
#include <stdint.h>
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
|
const char img_png_signature[] = {0x89, };
|
||||||
|
|
||||||
|
uint8_t* img_png_decode (FILE* fp);
|
17
main.c
Normal file
17
main.c
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
|
||||||
|
int main(int argc, char** argv) {
|
||||||
|
if(argc != 2) {
|
||||||
|
fprintf(stderr, "Usage: ./imgvwr FILE");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE* fp_image = fopen(argv[1], "rb");
|
||||||
|
if(!fp_image) {
|
||||||
|
perror("Failed to open image!");
|
||||||
|
exit(EXIT_FAILURE);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user