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

image line shifting #10

Closed wesmat closed 7 years ago

wesmat commented 7 years ago

All of the images I view have the same problem - lines of shifted data. I am running OSX 10.11.6 with java 1.8.0_111

screen shot 2016-12-22 at 9 37 18 pm

2012-05-29 20-28

stefanhaustein commented 7 years ago

Looks like there is a "gap" at the bottom, i.e. the character cell is not fully filled. Might be possible to address this to some extent by inverting colors and using the "opposite" character. Also, one of the characters seems to be wider. Might be possible to figure out which one using selection.

stefanhaustein commented 7 years ago

I have tried to use a reduced character set, which only contains characters with pixels at the top of the character box (assuming there is a gap at the bottom). Unfortunately, this only made the problem much worse on my mac.

I think the only way to avoid this is to reduce the line spacing in the terminal app: http://osxdaily.com/2015/01/05/increase-line-spacing-terminal-mac-os-x/

That said, your screenshot doesn't really took like Terminal.app -- are you using a different terminal app?

wesmat commented 7 years ago

Yes, I am using iterm2

On Mon, Dec 26, 2016 at 6:46 AM, Stefan Haustein notifications@github.com wrote:

Closed #10 https://github.com/stefanhaustein/TerminalImageViewer/issues/10.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stefanhaustein/TerminalImageViewer/issues/10#event-905071773, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7IlAeMlaKvfNJRhlKx_q48cyw7FfQ-ks5rL6kcgaJpZM4LUieo .

-- Wes Matchett Database Administrator/Developer Brewster Academy

wesmat commented 7 years ago

When I run in Terminal I get this:

[image: Inline image 1]

On Mon, Dec 26, 2016 at 8:49 AM, Wes Matchett < wes_matchett@brewsteracademy.org> wrote:

Yes, I am using iterm2

On Mon, Dec 26, 2016 at 6:46 AM, Stefan Haustein <notifications@github.com

wrote:

Closed #10 https://github.com/stefanhaustein/TerminalImageViewer/issues/10.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/stefanhaustein/TerminalImageViewer/issues/10#event-905071773, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7IlAeMlaKvfNJRhlKx_q48cyw7FfQ-ks5rL6kcgaJpZM4LUieo .

-- Wes Matchett Database Administrator/Developer Brewster Academy

-- Wes Matchett Database Administrator/Developer Brewster Academy

stefanhaustein commented 7 years ago

I can't see your Terminal output image, but I think terminal only supports 256 colors, so you'd need to use the -256 option. Did you try to remove line spacing in the iterm2 settings?

wesmat commented 7 years ago

Yep, changing to -256 in terminal works, but the lines still exist. In both terminal program I reduced the line spacing. The effect was the same in both - the image got shorter but the problem remains. Here is the Terminal output:

screen shot 2016-12-26 at 10 21 06 am

Here is Terminal with the line spacing reduced to .503

screen shot 2016-12-26 at 11 05 40 am

I guess there is nothing to do to fix.

stefanhaustein commented 7 years ago

I don't see this problem in terminal.app. Perhaps try a different font?