for (y = 0; y < height; y++) {
int ind = x + xcursor + images[scale]->width * (y + ycursor);
- if (ind >= images[scale]->width * images[scale]->height) {
- continue;
- }
+ //if (ind >= images[scale]->width * images[scale]->height) {
+ // continue;
+ //}
color_t *color = findncolor (correction (images[scale]->red[ind], gf[0]),
correction (images[scale]->green[ind], gf[1]),
correction (images[scale]->blue[ind], gf[2]), COLORS);
/* test: TERM=vt100 ndisplay.exe image/laurent4p.ppm 2>&1 | grep 'no color avaliable' */
/* test: ndisplay.exe -h | grep usage */
/* test: ndisplay.exe -v 2>&1 | grep missing */
+/* test: ndisplay.exe -g 2>&1 | grep 'no gamma specified' */
+/* test: ndisplay.exe -g -1.0 2>&1 | grep 'incorrect gamma' */
+/* test: ndisplay.exe -g 1.1:0:1.1 2>&1 | grep 'incorrect gamma' */
+/* test: ndisplay.exe -g 1.1:1.2 2>&1 | grep 'incorrect gamma' */
+/* test: ndisplay.exe -g 1.1,1.2,1.0 2>&1 | grep 'incorrect gamma' */
/* test: ndisplay.exe image/bogus1.ppm 2>&1 | grep "can't read PNM file" */
/* test: ndisplay.exe image/bogus2.ppm 2>&1 | grep "can't read PNM file" */
/* test: ndisplay.exe image/bogus3.pbm 2>&1 | grep "can't read PNM file" */
/* test: { echo u; sleep 1; echo lll; sleep 1; echo j; sleep 1; echo q; } | ndisplay.exe image/laurent4p.pgm */
/* test: { echo o; sleep 1; echo o; sleep 1; echo q; } | ndisplay.exe image/laurent4p.ppm */
/* test: { echo oooo; sleep 1; echo u; sleep 1; echo q; } | ndisplay.exe image/laurent4.pbm */
+/* test: { echo kklluLK; sleep 1; echo LLIJ; sleep 1; echo LLLLLKKKKooo; sleep 1; echo ijJI; sleep 1; echo q; } | ndisplay.exe image/laurent4.ppm -w */
/* test: { sleep 1; echo q; } | ndisplay.exe image/laurent4.pgm */
/* test: { sleep 1; echo q; } | ndisplay.exe image/laurent4b.pgm */
/* test: { sleep 1; echo q; } | ndisplay.exe image/laurent4.ppm -g 1.2:3:1 */