Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Logging errors

  • Loading branch information...
commit 692acaee49a074bb2c1027c865721ba5f15327f4 1 parent c3d8c55
@rc1 rc1 authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  src/colour-extractor.coffee
View
2  src/colour-extractor.coffee
@@ -10,6 +10,7 @@ exports.topColours = (sourceFilename, sorted, cb) ->
img = gm(sourceFilename)
tmpFilename = temp.path({suffix: '.miff'})
img.size((err, wh) ->
+ console.log err if err
ratio = wh.width/MAX_W
w2 = wh.width/2
h2 = wh.height/2
@@ -17,6 +18,7 @@ exports.topColours = (sourceFilename, sorted, cb) ->
.crop(w2, h2, w2/2, w2/2) # Center should be the most interesting
.scale(Math.ceil(wh.height/ratio), MAX_W) # Scales the image, histogram generation can take some time
.write('histogram:' + tmpFilename, (err) ->
+ console.log err if err
histogram = ''
miffRS = fs.createReadStream(tmpFilename, {encoding: 'utf8'})
Please sign in to comment.
Something went wrong with that request. Please try again.