From b9003c68248ac431f335c41bb69b166e11e6c628 Mon Sep 17 00:00:00 2001 From: Aleksander Adamowski Date: Sun, 23 Sep 2012 22:28:02 +0200 Subject: [PATCH 1/9] Make has_lib.sh work properly on Debian 64 bit --- util/has_lib.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/util/has_lib.sh b/util/has_lib.sh index cb9c663..5d58cd1 100755 --- a/util/has_lib.sh +++ b/util/has_lib.sh @@ -2,13 +2,17 @@ has_lib() { local regex="lib$1.+(so|dylib)$" + # Add /sbin to path as ldconfig is located there on some systems - e.g. Debian + # (and it still can be used by unprivileged users): + PATH="$PATH:/sbin" + export PATH # Try using ldconfig on linux systems for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; do return 0 done # Try just checking common library locations - for dir in /lib /usr/lib /usr/local/lib /opt/local/lib; do + for dir in /lib /usr/lib /usr/local/lib /opt/local/lib /usr/lib/x86_64-linux-gnu /usr/lib/i386-linux-gnu; do test -d $dir && ls $dir | grep -E $regex && return 0 done From 8f15f0cd608398428e2fdf4fdf11c5d6a657f11d Mon Sep 17 00:00:00 2001 From: Alex J Burke Date: Wed, 4 Sep 2013 13:34:11 +0200 Subject: [PATCH 2/9] Remove the trailing $ which fails to match libraries suffixed .so.* --- util/has_lib.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/has_lib.sh b/util/has_lib.sh index cb9c663..8313a6c 100755 --- a/util/has_lib.sh +++ b/util/has_lib.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash has_lib() { - local regex="lib$1.+(so|dylib)$" + local regex="lib$1.+(so|dylib)" # Try using ldconfig on linux systems for LINE in `which ldconfig > /dev/null && ldconfig -p 2>/dev/null | grep -E $regex`; do From bdc38e17c7f546cd9982497dd85d795854ecb961 Mon Sep 17 00:00:00 2001 From: kangax Date: Wed, 9 Oct 2013 12:15:13 +0200 Subject: [PATCH 3/9] Version 1.1.1 --- History.md | 19 ++++++++++++------- package.json | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/History.md b/History.md index d3bb98c..6923a3d 100644 --- a/History.md +++ b/History.md @@ -1,30 +1,35 @@ -1.1.0 / 2013-08-01 +1.1.1 / 2013-10-09 ================== - * add png compression options - * add jpeg stream progressive mode option + * add better support for outdated versions of Cairo + +1.1.0 / 2013-08-01 +================== + + * add png compression options + * add jpeg stream progressive mode option * fix resource leaks on read errors -1.0.4 / 2013-07-23 +1.0.4 / 2013-07-23 ================== * 0.11.4+ compatibility using NAN * fix typo in context2d for imageSmoothingEnabled -1.0.3 / 2013-06-04 +1.0.3 / 2013-06-04 ================== * add "nearest" and "bilinear" to patternQuality * fix fread() retval check (items not bytes) * removed unneeded private fields -1.0.2 / 2013-03-22 +1.0.2 / 2013-03-22 ================== * add Context2d#imageSmoothingEnabled= -1.0.1 / 2013-02-25 +1.0.1 / 2013-02-25 ================== * travis: test modern node versions diff --git a/package.json b/package.json index 16b92c6..7f6f3d5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "canvas" , "description": "Canvas graphics API backed by Cairo" - , "version": "1.1.0" + , "version": "1.1.1" , "author": "TJ Holowaychuk " , "keywords": ["canvas", "graphic", "graphics", "pixman", "cairo", "image", "images", "pdf"] , "homepage": "https://github.com/learnboost/node-canvas" From 5b1886340c717695b7719ea59211c5522a55a12b Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Fri, 11 Oct 2013 08:37:47 +1100 Subject: [PATCH 4/9] improved nan location discovery, fixes #339 --- binding.gyp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binding.gyp b/binding.gyp index 0f23e2a..67a8d6c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -21,7 +21,7 @@ 'targets': [ { 'target_name': 'canvas', - 'include_dirs': [" Date: Thu, 24 Oct 2013 20:59:18 +0200 Subject: [PATCH 5/9] Use node::MakeCallback() instead of v8::Function::Call() --- src/Canvas.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Canvas.cc b/src/Canvas.cc index 2fa189d..3a88b41 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -351,7 +351,7 @@ streamPNG(void *c, const uint8_t *data, unsigned len) { Local::New(Null()) , buf , Integer::New(len) }; - closure->fn->Call(Context::GetCurrent()->Global(), 3, argv); + MakeCallback(Context::GetCurrent()->Global(), closure->fn, 3, argv); return CAIRO_STATUS_SUCCESS; } @@ -420,13 +420,13 @@ NAN_METHOD(Canvas::StreamPNGSync) { NanReturnValue(try_catch.ReThrow()); } else if (status) { Local argv[1] = { Canvas::Error(status) }; - closure.fn->Call(Context::GetCurrent()->Global(), 1, argv); + MakeCallback(Context::GetCurrent()->Global(), closure.fn, 1, argv); } else { Local argv[3] = { Local::New(Null()) , Local::New(Null()) , Integer::New(0) }; - closure.fn->Call(Context::GetCurrent()->Global(), 3, argv); + MakeCallback(Context::GetCurrent()->Global(), closure.fn, 3, argv); } NanReturnUndefined(); } From 738f12d17b1f7478d7bdb7735e106afe01983e56 Mon Sep 17 00:00:00 2001 From: Rod Vagg Date: Thu, 31 Oct 2013 21:44:42 +1100 Subject: [PATCH 6/9] NAN dep upgrade, full node@<=0.11.8 compatibility --- package.json | 2 +- src/CanvasPattern.cc | 2 +- src/init.cc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 7f6f3d5..38cefc6 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "test": "make test" } , "dependencies": { - "nan": "~0.3.0" + "nan": "~0.4.1" } , "devDependencies": { "express": "3.0" diff --git a/src/CanvasPattern.cc b/src/CanvasPattern.cc index 1a42557..16bb99f 100644 --- a/src/CanvasPattern.cc +++ b/src/CanvasPattern.cc @@ -17,7 +17,7 @@ Persistent Pattern::constructor; void Pattern::Initialize(Handle target) { - HandleScope scope; + NanScope(); // Constructor Local ctor = FunctionTemplate::New(Pattern::New); diff --git a/src/init.cc b/src/init.cc index 6cb17ff..f7c822d 100755 --- a/src/init.cc +++ b/src/init.cc @@ -20,7 +20,7 @@ extern "C" void init (Handle target) { - HandleScope scope; + NanScope(); Canvas::Initialize(target); Image::Initialize(target); ImageData::Initialize(target); From fc7d75466bb486007eb48269076f45fd887d9560 Mon Sep 17 00:00:00 2001 From: kangax Date: Thu, 31 Oct 2013 12:56:15 +0100 Subject: [PATCH 7/9] Version 1.1.2 --- History.md | 7 +++++++ package.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/History.md b/History.md index 6923a3d..76bb6a1 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,10 @@ +1.1.2 / 2013-10-31 +================== + + * NAN dep upgrade, full node@<=0.11.8 compatibility + * Use node::MakeCallback() instead of v8::Function::Call() + * Improve nan location discovery + * Fix enabling gif/jpeg options on Ubuntu 13.04 1.1.1 / 2013-10-09 ================== diff --git a/package.json b/package.json index 38cefc6..bbfe41e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "canvas" , "description": "Canvas graphics API backed by Cairo" - , "version": "1.1.1" + , "version": "1.1.2" , "author": "TJ Holowaychuk " , "keywords": ["canvas", "graphic", "graphics", "pixman", "cairo", "image", "images", "pdf"] , "homepage": "https://github.com/learnboost/node-canvas" From 8c499a0150fcafacf5af9b3f04b98826f0bd4fd1 Mon Sep 17 00:00:00 2001 From: Ben Nyberg Date: Tue, 5 Nov 2013 13:45:20 -0500 Subject: [PATCH 8/9] Fixed case on Readme Canvas#jpegStream() example (canvas.jpegStream, not canvas.JPEGStream) --- Readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Readme.md b/Readme.md index c76f94e..e209320 100644 --- a/Readme.md +++ b/Readme.md @@ -109,7 +109,7 @@ _Note: At the moment, `jpegStream()` is the same as `syncJPEGStream()`, both are synchronous_ ```javascript -var stream = canvas.JPEGStream({ +var stream = canvas.jpegStream({ bufsize: 4096 // output buffer size in bytes, default: 4096 , quality: 75 // JPEG quality (0-100) default: 75 , progressive: false // true for progressive compression, default: false From bc6df356f5ad64eebebcb14b165fd06f3eae4932 Mon Sep 17 00:00:00 2001 From: Stefan Lau Date: Thu, 14 Nov 2013 13:56:26 +0100 Subject: [PATCH 9/9] fix argument index for filter parameter --- src/Canvas.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Canvas.cc b/src/Canvas.cc index 3a88b41..f1be156 100644 --- a/src/Canvas.cc +++ b/src/Canvas.cc @@ -277,7 +277,7 @@ NAN_METHOD(Canvas::ToBuffer) { if (!args[2]->StrictEquals(Undefined())) { if (args[2]->IsUint32()) { - filter = args[1]->Uint32Value(); + filter = args[2]->Uint32Value(); } else { return NanThrowTypeError("Invalid filter value."); }