Browse Source

Update TODOs

rexim 2 years ago
parent
commit
037b94d716
1 changed files with 5 additions and 1 deletions
  1. 5 1
      img2term.c

+ 5 - 1
img2term.c

@@ -605,7 +605,7 @@ char *shift_args(int *argc, char ***argv)
 
 
 int main(int argc, char **argv)
 int main(int argc, char **argv)
 {
 {
-    // TODO: 16 colors support
+    // TODO: Add 16 colors support
     assert(argc > 0);
     assert(argc > 0);
     const char *program = shift_args(&argc, &argv);
     const char *program = shift_args(&argc, &argv);
 
 
@@ -633,6 +633,8 @@ int main(int argc, char **argv)
             int width, height;
             int width, height;
             uint32_t *pixels = (uint32_t*)stbi_load(file_path, &width, &height, NULL, 4);
             uint32_t *pixels = (uint32_t*)stbi_load(file_path, &width, &height, NULL, 4);
             if (pixels == NULL) {
             if (pixels == NULL) {
+                // TODO: don't crash the entire program on failed to open file.
+                // Just continue processing the files.
                 fprintf(stderr, "ERROR: could not read file %s\n", file_path);
                 fprintf(stderr, "ERROR: could not read file %s\n", file_path);
                 exit(1);
                 exit(1);
             }
             }
@@ -641,6 +643,8 @@ int main(int argc, char **argv)
 
 
             // TODO: maybe use a custom resize algorithm that does not require any memory allocation?
             // TODO: maybe use a custom resize algorithm that does not require any memory allocation?
             // Similar to how olive.c resize the sprites.
             // Similar to how olive.c resize the sprites.
+            // (Though stb_image_resize supports a lot of fancy filters and stuff which we may try
+            // to utilize to improve the results)
             uint32_t *resized_pixels = malloc(sizeof(uint32_t)*resized_width*resized_height);
             uint32_t *resized_pixels = malloc(sizeof(uint32_t)*resized_width*resized_height);
             if (resized_pixels == NULL) {
             if (resized_pixels == NULL) {
                 fprintf(stderr, "ERROR: could not allocate memory for resized image\n");
                 fprintf(stderr, "ERROR: could not allocate memory for resized image\n");