fix last commit

This commit is contained in:
Aaron Liu 2024-02-01 18:14:23 -05:00
parent 7b3c8286fe
commit d9c1b47816
No known key found for this signature in database
GPG key ID: 2D4DA57B12065A35

View file

@ -550,13 +550,13 @@ void printImage(const cimg_library::CImg<unsigned char> &image,
? createCharData(image, x, y, 0x2584, 0x0000ffff) ? createCharData(image, x, y, 0x2584, 0x0000ffff)
: findCharData(image, x, y, flags); : findCharData(image, x, y, flags);
if (x == 0 || charData.bgColor != lastCharData.bgColor) if (x == 0 || charData.bgColor != lastCharData.bgColor)
std::cout << emitTermColor(flags | FLAG_BG, charData.bgColor[0], std::cout << emitTermColor(
charData.bgColor[1], charData.bgColor[0], charData.bgColor[1],
charData.bgColor[2]); charData.bgColor[2], flags | FLAG_BG);
if (x == 0 || charData.fgColor != lastCharData.fgColor) if (x == 0 || charData.fgColor != lastCharData.fgColor)
std::cout << emitTermColor(flags | FLAG_FG, charData.fgColor[0], std::cout << emitTermColor(
charData.fgColor[1], charData.fgColor[0], charData.fgColor[1],
charData.fgColor[2]); charData.fgColor[2], flags | FLAG_FG);
printCodepoint(charData.codePoint); printCodepoint(charData.codePoint);
lastCharData = charData; lastCharData = charData;
} }