Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with creating image #59

Closed
haydenbleasel opened this issue Nov 3, 2015 · 1 comment
Closed

Problem with creating image #59

haydenbleasel opened this issue Nov 3, 2015 · 1 comment

Comments

@haydenbleasel
Copy link

Hello,

I'm having trouble creating a blank canvas with a background colour:

jimp = new Jimp('144', '144', 0xffdddddd, function (error, canvas) {
   console.log(error, canvas);
});

Problem is, I get this error:

/Users/haydenbleasel/Projects/favicons/node_modules/jimp/index.js:49
    else throw error;
         ^

Error: cb must be a function
    at Jimp.throwError (/Users/haydenbleasel/Projects/favicons/node_modules/jimp/index.js:47:43)
    at new Jimp (/Users/haydenbleasel/Projects/favicons/node_modules/jimp/index.js:91:31)
    at createImage (/Users/haydenbleasel/Projects/favicons/index.js:42:24)
    at /Users/haydenbleasel/Projects/favicons/index.js:61:21
    at Object.async.forEachOf.async.eachOf (/Users/haydenbleasel/Projects/favicons/node_modules/async/lib/async.js:233:13)
    at generateFavicons (/Users/haydenbleasel/Projects/favicons/index.js:55:19)
    at /Users/haydenbleasel/Projects/favicons/index.js:79:17
    at Object.async.forEachOf.async.eachOf (/Users/haydenbleasel/Projects/favicons/node_modules/async/lib/async.js:233:13)
    at module.exports (/Users/haydenbleasel/Projects/favicons/index.js:76:15)
    at Object.<anonymous> (/Users/haydenbleasel/Projects/favicons/test.js:3:1)
@haydenbleasel
Copy link
Author

Nevermind sorry, this is the result of passing in width and height parameters that are not integers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant