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

Odd results with true greyscale images #44

Closed AlanDeSmet closed 5 years ago

AlanDeSmet commented 5 years ago

True greyscale images exhibit odd behavior. Sometimes tiv simply crashes. But most of the time the image is very strangely rendered. I think tiv is assuming 3 channels, but CImg is only providing 1, so things are mapped strangely and in some cases tiv just tries to read invalid memory.

This is my test image.

Actual behavior: bad-abe

Expected behavior: good-abe