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);