atextor / icat

icat (Image cat) outputs images in 256-color capable terminals.
152 stars 12 forks source link

icat display image in 24 bit #13

Closed Morpheus3000 closed 6 years ago

Morpheus3000 commented 6 years ago

I just came across icat. I am using Arch Linux. I tried displaying an image with icat, but it always displays in 256 colour, instead of 24 bit. image

My terminal already supports 24 bit colour as can be seen from the following test:

image

I tried searching the internet for enabling 24 bit colour support for icat, but all I could up with is that it is supported by default in icat. So my question is how do I get the pictures to display in 24 bit colour.

atextor commented 6 years ago

Hi, icat by default uses indexed (256 colors) mode. To enable 24bits, use the switch '-m 24bit' or '-m both'.

Morpheus3000 commented 6 years ago

Hi! Thanks for the reply! I tried it with that switch, but the results seems pixelated. Is there anyway to get around it? I am looking for an effect similar to imgcat that is available on iterm. Seems to me icat resizes the image and then upscales it to terminal size causes it to become pixelated. (I am just speculating, I might be completely wrong here in this assumption.)

atextor commented 6 years ago

The results are pixelated, because icat uses the Unicode box characters ▀ and ▄ with the right foreground and background color escapes to draw images, as there is no standard way to output actual images in terminal emulators. There are ways to achieve what you want on Linux, they depend on which terminal emulator you use, though.