Merge branch 'improve-canvas-size' of http://github.com/jsummers/nfnt.resize into fix-canvas-size-issue
This commit is contained in:
commit
b6fef854bc
|
@ -64,7 +64,7 @@ func Resize(width, height uint, img image.Image, interp InterpolationFunction) i
|
||||||
scaleX, scaleY := calcFactors(width, height, oldWidth, oldHeight)
|
scaleX, scaleY := calcFactors(width, height, oldWidth, oldHeight)
|
||||||
t := Trans2{scaleX, 0, float32(oldBounds.Min.X), 0, scaleY, float32(oldBounds.Min.Y)}
|
t := Trans2{scaleX, 0, float32(oldBounds.Min.X), 0, scaleY, float32(oldBounds.Min.Y)}
|
||||||
|
|
||||||
resizedImg := image.NewRGBA64(image.Rect(0, 0, int(oldWidth/scaleX), int(oldHeight/scaleY)))
|
resizedImg := image.NewRGBA64(image.Rect(0, 0, int(0.7+oldWidth/scaleX), int(0.7+oldHeight/scaleY)))
|
||||||
b := resizedImg.Bounds()
|
b := resizedImg.Bounds()
|
||||||
|
|
||||||
n := numJobs(b.Dy())
|
n := numJobs(b.Dy())
|
||||||
|
|
Loading…
Reference in New Issue
Block a user