diff options
author | kartofen <mladenovnasko0@gmail.com> | 2022-08-11 21:45:03 +0300 |
---|---|---|
committer | kartofen <mladenovnasko0@gmail.com> | 2022-08-11 21:45:03 +0300 |
commit | 30d1c9b30b5642efcba66bdc7956f4d7e321fc97 (patch) | |
tree | ae3cf3aeb4b01f1cb70ae84cc84d453e08da35a5 /src/ppm.c | |
parent | 57315da56fa3b036f8e3e2d32a5f90a11ae7c3de (diff) |
more used friendly
Diffstat (limited to 'src/ppm.c')
-rw-r--r-- | src/ppm.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -29,7 +29,7 @@ void save_as_ppm(char* file_path, small_t *t, size_t width, size_t height, size_ fclose(fp); } -small_t *load_from_ppm(char *file_path, size_t *width, size_t *height) +char *load_from_ppm(char *file_path, size_t *width, size_t *height) { FILE *fp = fopen(file_path, "rb"); if(!fp) { @@ -55,7 +55,7 @@ small_t *load_from_ppm(char *file_path, size_t *width, size_t *height) exit(1); } - small_t *t = malloc((*width) * (*height ) * 3); + char *t = malloc((*width) * (*height ) * 3); fread(t, *width*3, *height, fp); @@ -64,7 +64,7 @@ small_t *load_from_ppm(char *file_path, size_t *width, size_t *height) return t; } -void free_ppm(small_t *t) +void free_ppm(char *t) { free(t); } |