diff options
| author | Clement Sibille <clements+git@lisible.xyz> | 2024-03-08 01:16:53 +0900 |
|---|---|---|
| committer | Clement Sibille <clements+git@lisible.xyz> | 2024-03-08 01:16:53 +0900 |
| commit | 943bcac90e5e3aaee0647b070e760c0985d03d0d (patch) | |
| tree | 135bb1a1a20c7655f5ecfd94ea36c82750f61f7f /lisiblepng-bin/src | |
| parent | 665e6155ac8b055d89cead210300ab22a91f74ff (diff) | |
Add LisPng_write_RGBA8_data()
Diffstat (limited to 'lisiblepng-bin/src')
| -rw-r--r-- | lisiblepng-bin/src/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lisiblepng-bin/src/main.c b/lisiblepng-bin/src/main.c index 6b52f2f..730ae9a 100644 --- a/lisiblepng-bin/src/main.c +++ b/lisiblepng-bin/src/main.c @@ -14,6 +14,11 @@ int main(int argc, char **argv) { const char *png_filepath = argv[1]; FILE *png_file = fopen(png_filepath, "r"); + fseek(png_file, 0, SEEK_END); + long file_size = ftell(png_file); + LOGN("File size: %ld bytes", file_size); + fseek(png_file, 0, SEEK_SET); + if (!png_file) { const char *error_message = strerror(errno); LOGN("Couldn't open PNG file: %s", error_message); |
