~dricottone/image2ascii

74772863b8351f7daa09a39d094aa69ee4bc814b — mjip 2 years ago 4db5ede
Log terminal size determination error instead of nil
1 files changed, 4 insertions(+), 3 deletions(-)

M convert/resize.go
M convert/resize.go => convert/resize.go +4 -3
@@ 1,10 1,11 @@
package convert

import (
	"github.com/nfnt/resize"
	"github.com/qeesung/image2ascii/terminal"
	"image"
	"log"

	"github.com/nfnt/resize"
	"github.com/qeesung/image2ascii/terminal"
)

// NewResizeHandler create a new resize handler


@@ 126,7 127,7 @@ func (handler *ImageResizeHandler) resolveSize(sz image.Rectangle, options *Opti
func (handler *ImageResizeHandler) CalcProportionalFittingScreenSize(sz image.Rectangle) (newWidth, newHeight int, err error) {
	screenWidth, screenHeight, err := handler.terminal.ScreenSize()
	if err != nil {
		log.Fatal(nil)
		log.Fatal(err)
	}
	newWidth, newHeight = handler.CalcFitSize(
		float64(screenWidth),