Fixed bug for new lines printing in between on command prompt

This commit is contained in:
unknown 2021-05-13 17:10:09 +05:00
parent db73dac502
commit 47e469a8a6
2 changed files with 5 additions and 1 deletions

View File

@ -27,7 +27,7 @@ For custom Go installs
go install github.com/TheZoraiz/ascii-image-converter@latest go install github.com/TheZoraiz/ascii-image-converter@latest
``` ```
For physically installing the binaries, download the executables from [here](https://github.com/TheZoraiz/ascii-image-converter/releases/tag/v1.1.13), and follow the steps with respect to your OS. For physically installing the binaries, download the executables from [here](https://github.com/TheZoraiz/ascii-image-converter/releases/tag/v1.1.14), and follow the steps with respect to your OS.
### Linux ### Linux
Extract Executables.zip and open the "Linux" directory. Extract Executables.zip and open the "Linux" directory.

View File

@ -48,6 +48,10 @@ func ConvertToTerminalSizedSlices(img image.Image, dimensions []int) [][]uint32
if len(dimensions) == 0 { if len(dimensions) == 0 {
terminalWidth, _ = consolesize.GetConsoleSize() terminalWidth, _ = consolesize.GetConsoleSize()
// Sometimes full length outputs print empty lines between ascii art
terminalWidth -= 1
smallImg = resize.Resize(uint(terminalWidth), 0, img, resize.Lanczos3) smallImg = resize.Resize(uint(terminalWidth), 0, img, resize.Lanczos3)
terminalHeight = smallImg.Bounds().Max.Y terminalHeight = smallImg.Bounds().Max.Y
terminalHeight -= terminalHeight / 2 terminalHeight -= terminalHeight / 2