Correct image direction
authorLaurent Mazet <mazet@softndesign.org>
Thu, 12 Sep 2024 19:31:30 +0000 (21:31 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Thu, 12 Sep 2024 19:31:30 +0000 (21:31 +0200)
display.c

index c11824bba2312b0eac2f628b696c616cbfa93be0..b097ff78e065e564c346ab963846a7140f3f0e22 100644 (file)
--- a/display.c
+++ b/display.c
 
 int main (int argc, char *argv[])
 {
-    float gamma = 1.;
+    float gamma = 1.0;
     int i;
     for (i = 1; i < argc; i++) {
        image_t *image = readppm (argv[i]);
 
        int k, l;
-       for (k = 0; k < image->width; k++) {
-           for (l = 0; l < image->height; l++) {
+       for (l = 0; l < image->height; l++) {
+           for (k = 0; k < image->width; k++) {
                int ind = k + image->width * l;
                color_t *color = findcolor (gamma * image->red[ind], gamma * image->green[ind], gamma * image->blue[ind]);
                cprint (color, " ");