diff --git a/Godeps/Godeps.json b/Godeps/Godeps.json index c012125..4ccfc27 100644 --- a/Godeps/Godeps.json +++ b/Godeps/Godeps.json @@ -1,6 +1,6 @@ { "ImportPath": "github.com/VoycerAG/gridfs-image-server", - "GoVersion": "go1.4", + "GoVersion": "go1.4.2", "Deps": [ { "ImportPath": "code.google.com/p/go.image/bmp", @@ -25,8 +25,17 @@ "Rev": "14cafe28513321476c73967a5a4f3454b6129c46" }, { - "ImportPath": "github.com/nfnt/resize", - "Rev": "ccddecd1bf0b15e36e2ffcfdef7c6832eaa0dbf6" + "ImportPath": "github.com/yvasiyarov/go-metrics", + "Rev": "c25f46c4b94079672242ec48a545e7ca9ebe3aec" + }, + { + "ImportPath": "github.com/yvasiyarov/gorelic", + "Comment": "v0.0.6-22-g9fe479b", + "Rev": "9fe479b46261664fba456a6aacdc31933b94cfd1" + }, + { + "ImportPath": "github.com/yvasiyarov/newrelic_platform_go", + "Rev": "cef0ebd22fb48453114ba645d0fb80fea6e670de" }, { "ImportPath": "gopkg.in/mgo.v2", diff --git a/server/image.go b/server/image.go index 70953f5..07cfed0 100644 --- a/server/image.go +++ b/server/image.go @@ -14,7 +14,6 @@ import ( "syscall" "github.com/disintegration/imaging" - "github.com/nfnt/resize" "gopkg.in/mgo.v2" ) @@ -108,7 +107,7 @@ func ResizeImage(originalImageData image.Image, imageFormat string, entry *Entry targetHeight = 0 } - dst = resize.Resize(uint(targetWidth), uint(targetHeight), originalImageData, resize.Lanczos3) + dst = imaging.Resize(originalImageData, int(targetWidth), int(targetHeight), imaging.Lanczos) } else if entry.Type == TypeFit { if targetWidth < 0 || targetHeight < 0 { return nil, "", fmt.Errorf("When using type fit, both height and width must be specified") @@ -122,7 +121,7 @@ func ResizeImage(originalImageData image.Image, imageFormat string, entry *Entry targetWidth = targetHeight * originalRatio } - dst = resize.Resize(uint(targetWidth), uint(targetHeight), originalImageData, resize.Lanczos3) + dst = imaging.Resize(originalImageData, int(targetWidth), int(targetHeight), imaging.Lanczos) } else { // typeCut if targetWidth < 0 { diff --git a/server/image_test.go b/server/image_test.go index cad3cd8..cfc1d20 100644 --- a/server/image_test.go +++ b/server/image_test.go @@ -99,7 +99,7 @@ func (s *ImageTestSuite) TestValidEntryTypeResizeAndFormatForwardingWidthMissing c.Assert(imageFormat, Equals, "i do not care") c.Assert(imageError, IsNil) - c.Assert((*imageData).Bounds().Dx(), Equals, 534) + c.Assert((*imageData).Bounds().Dx(), Equals, 533) c.Assert((*imageData).Bounds().Dy(), Equals, 400) }