Skip to content

Error: x and y must be numbers when cropping profile picture #91

Description

@itsreimau

Jimp throws an error when trying to crop a profile picture. The x and y values passed to the crop method are not valid numbers.

Error: x and y must be numbers
    at Jimp.throwError ([REDACTED]/node_modules/@jimp/utils/dist/index.js:21:13)
    at Jimp.cropQuiet ([REDACTED]/node_modules/@jimp/plugin-crop/dist/index.js:21:82)
    at Jimp.<computed> [as crop] ([REDACTED]/node_modules/@jimp/core/dist/index.js:950:23)
    at generateProfilePicture ([REDACTED]/node_modules/baileys/lib/Utils/messages-media.js:233:30)
    at async Object.updateProfilePicture ([REDACTED]/node_modules/baileys/lib/Socket/chats.js:304:25)
    at async Object.code ([REDACTED]/commands/owner/setbotpp.js:18:13) {
  methodName: 'crop',
  eventName: 'error'
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions