Browse Source

Added width x height to Image#inspect()

v1.x
Tj Holowaychuk 14 years ago
parent
commit
8b64b12f56
  1. 1
      lib/image.js
  2. 2
      src/Image.cc

1
lib/image.js

@ -21,6 +21,7 @@ var Canvas = require('../build/default/canvas')
Image.prototype.inspect = function(){ Image.prototype.inspect = function(){
return '[Image' return '[Image'
+ (this.complete ? ':' + this.width + 'x' + this.height : '')
+ (this.src ? ' ' + this.src : '') + (this.src ? ' ' + this.src : '')
+ (this.complete ? ' complete' : '') + (this.complete ? ' complete' : '')
+ ']'; + ']';

2
src/Image.cc

@ -315,7 +315,7 @@ Image::loadSurface() {
, width , width
, height , height
, width * 4); , width * 4);
cairo_surface_write_to_png(_surface, "test2.png");
fclose(stream); fclose(stream);
jpeg_finish_decompress(&info); jpeg_finish_decompress(&info);
jpeg_destroy_decompress(&info); jpeg_destroy_decompress(&info);

Loading…
Cancel
Save