Remove unnecessary second pixel row fill

This commit is contained in:
Bob Polis 2024-01-30 13:06:45 +01:00
parent 447b41fc3e
commit b80e3581b5

View File

@ -14,11 +14,6 @@ void write_image(std::ostream& os, FILE* in) {
pnm_readpamrow(&info, row1.get()); pnm_readpamrow(&info, row1.get());
if (y < info.height - 1) { if (y < info.height - 1) {
pnm_readpamrow(&info, row2.get()); pnm_readpamrow(&info, row2.get());
} else {
// fill second row with terminal background color
for (int col = 0; col < info.width; ++col) {
t2[col][0] = t2[col][1] = t2[col][2] = 0;
}
} }
for (int x = 0; x < info.width; ++x) { for (int x = 0; x < info.width; ++x) {
if (info.depth == 3) { // assume RGB, 1 byte per sample if (info.depth == 3) { // assume RGB, 1 byte per sample