From 2687aca8e1f3d4e2032ca2ba1cc6a6184ee77b06 Mon Sep 17 00:00:00 2001 From: David Rice Date: Mon, 13 Aug 2012 15:12:11 +0100 Subject: [PATCH 1/3] Use node-canvas 0.13.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a5be6b5a..b36a2112 100644 --- a/package.json +++ b/package.json @@ -14,7 +14,7 @@ "test": "node test.js" }, "dependencies": { - "canvas": "0.12.0", + "canvas": "0.13.0", "jsdom": ">=0.2.3", "xmldom": ">=0.1.7" }, From 562c81b0f68a57f3b20a414b4c037d4773936985 Mon Sep 17 00:00:00 2001 From: David Rice Date: Mon, 13 Aug 2012 15:15:09 +0100 Subject: [PATCH 2/3] Specify all of node-canvas apt dependencies for travis ci --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 81112458..012217c4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,7 @@ language: node_js node_js: - 0.6 - - 0.8 \ No newline at end of file + - 0.8 +before_install: + - sudo apt-get update -qq + - sudo apt-get install -qq libgif-dev libpng-dev libjpeg8-dev libpango1.0-dev libcairo2-dev \ No newline at end of file From 19763483df5c4ebabe82310d17ec9d731baba8f3 Mon Sep 17 00:00:00 2001 From: David Rice Date: Mon, 13 Aug 2012 16:30:31 +0100 Subject: [PATCH 3/3] With node-canvas 0.13.0 (and libgif installed) image width/height can be determined for a .gif --- test/unit/image.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/unit/image.js b/test/unit/image.js index 19d7c534..dd230006 100644 --- a/test/unit/image.js +++ b/test/unit/image.js @@ -18,8 +18,8 @@ 'type': 'image', 'left': 0, 'top': 0, - 'width': fabric.isLikelyNode ? 0 : IMG_WIDTH, // node-canvas doesn't seem to allow setting width/height on image objects - 'height': fabric.isLikelyNode ? 0 : IMG_HEIGHT, + 'width': IMG_WIDTH, // node-canvas doesn't seem to allow setting width/height on image objects + 'height': IMG_HEIGHT, 'fill': 'rgb(0,0,0)', 'overlayFill': null, 'stroke': null,