immp
Advanced tools
Comparing version 1.5.0 to 1.5.1
{ | ||
"name": "immp", | ||
"description": "Image Manipulation Middleware Proxy", | ||
"version": "1.5.0", | ||
"version": "1.5.1", | ||
"repository": "garrows/IMMP", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
@@ -184,2 +184,6 @@ var _ = require('underscore'), | ||
if(hasCrop) { | ||
customCrop.x = parseInt(customCrop.x); | ||
customCrop.y = parseInt(customCrop.y); | ||
customCrop.w = parseInt(customCrop.w); | ||
customCrop.h = parseInt(customCrop.h); | ||
gmImage.crop(customCrop.w, customCrop.h, customCrop.x, customCrop.y); | ||
@@ -186,0 +190,0 @@ |
@@ -218,7 +218,7 @@ var async = require('async'), | ||
it('should do a custom crop', function (_done) { | ||
it('should do a custom crop and round exponents', function (_done) { | ||
this.slow(5000); | ||
this.timeout(10000); | ||
http.get(serverUrl + '/im/?image=/images/robot.jpg&sx=0&sy=0&sw=100&sh=111', function (_httpResponse) { | ||
http.get(serverUrl + '/im/?image=/images/robot.jpg&sx=0.4&sy=5.798028723802416e-15&sw=100.4&sh=111.4', function (_httpResponse) { | ||
@@ -438,3 +438,3 @@ _httpResponse.statusCode.should.eql(200); | ||
filesize.should.be.lessThan(_fileSizeWithoutCompression); | ||
(filesize / _fileSizeWithoutCompression).should.be.greaterThan(.5).and.lessThan(.8); | ||
(filesize / _fileSizeWithoutCompression).should.be.greaterThan(0.5).and.lessThan(0.8); | ||
_callback(null, filesize); | ||
@@ -441,0 +441,0 @@ }); |
1331005
677
26