From 8b64b12f56b0a2e9a9f88953d1a9ef47c6d58be1 Mon Sep 17 00:00:00 2001 From: Tj Holowaychuk Date: Thu, 18 Nov 2010 09:38:20 -0800 Subject: [PATCH] Added width x height to Image#inspect() --- lib/image.js | 1 + src/Image.cc | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/image.js b/lib/image.js index be0658b..231d6be 100644 --- a/lib/image.js +++ b/lib/image.js @@ -21,6 +21,7 @@ var Canvas = require('../build/default/canvas') Image.prototype.inspect = function(){ return '[Image' + + (this.complete ? ':' + this.width + 'x' + this.height : '') + (this.src ? ' ' + this.src : '') + (this.complete ? ' complete' : '') + ']'; diff --git a/src/Image.cc b/src/Image.cc index 0c289f6..df4d392 100644 --- a/src/Image.cc +++ b/src/Image.cc @@ -315,7 +315,7 @@ Image::loadSurface() { , width , height , width * 4); -cairo_surface_write_to_png(_surface, "test2.png"); + fclose(stream); jpeg_finish_decompress(&info); jpeg_destroy_decompress(&info);