stefanhaustein / TerminalImageViewer

Small C++ program to display images in a (modern) terminal using RGB ANSI codes and unicode block graphics characters
Other
1.56k stars 111 forks source link

Convert greyscale inputs to RGB. #44 #45

Closed AlanDeSmet closed 5 years ago

AlanDeSmet commented 5 years ago

Fixes #44 "Odd results with true greyscale images"

Calls to CImg<T>(const char * const file) are wrapped in the new load_rgb_CImg. That function loads as normal, but if it detects that that image only has one channel (that is, is greyscale), it creates a three channeled image and copies the single source channel into each.

stefanhaustein commented 5 years ago

Thanks!