~dricottone/image2ascii

85eb98c10570e799d3d36e23ca061b79706d48e2 — qeesung 6 years ago bc12009
remove some useless code
1 files changed, 0 insertions(+), 11 deletions(-)

M resize/resize.go
M resize/resize.go => resize/resize.go +0 -11
@@ 5,9 5,6 @@ package resize
import (
	"github.com/nfnt/resize"
	"image"
	"image/jpeg"
	"log"
	"os"
	"runtime"
)



@@ 18,14 15,6 @@ func ScaleImage(image image.Image, ratio float64) (newImage image.Image) {
	newHeight := int(float64(sz.Max.Y) * ratio * charWidth())

	newImage = resize.Resize(uint(newWidth), uint(newHeight), image, resize.Lanczos3)
	out, err := os.Create("test_resized.jpg")
	if err != nil {
		log.Fatal(err)
	}
	defer out.Close()

	// write new image to file
	jpeg.Encode(out, newImage, nil)
	return
}