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

Jimp.read is not a function #108

Closed
Susan123456789 opened this issue Nov 13, 2019 · 3 comments
Closed

Jimp.read is not a function #108

Susan123456789 opened this issue Nov 13, 2019 · 3 comments
Labels

Comments

@Susan123456789
Copy link

I am trying to use node-vibrant on an image Buffer (obtained from an image on s3) in a node.js serverless function.

        const image=
            await s3.getObject({
                Bucket:     bucket,
                Key:        key,
            }).promise();

        const palette = await Vibrant.from(image.Body).getPalette();

However, I keep getting the error:

TypeError: Jimp.read is not a function
    at NodeImage.../../@vibrant/image-node/lib/index.js.NodeImage._loadByJimp (/mnt/c/dev/photobook/image-optimizer/.webpack/image-optimizer/webpack:/mnt/c/dev/photobook/image-optimizer/node_modules/@vibrant/image-node/lib/index.js:61:1)
    at NodeImage.../../@vibrant/image-node/lib/index.js.NodeImage.load (/mnt/c/dev/photobook/image-optimizer/.webpack/image-optimizer/webpack:/mnt/c/dev/photobook/image-optimizer/node_modules/@vibrant/image-node/lib/index.js:72:1)
    at Vibrant.../../@vibrant/core/lib/index.js.Vibrant.getPalette (/mnt/c/dev/photobook/image-optimizer/.webpack/image-optimizer/webpack:/mnt/c/dev/photobook/image-optimizer/node_modules/@vibrant/core/lib/index.js:44:1)
    at Builder.../../@vibrant/core/lib/builder.js.Builder.getPalette (/mnt/c/dev/photobook/image-optimizer/.webpack/image-optimizer/webpack:/mnt/c/dev/photobook/image-optimizer/node_modules/@vibrant/core/lib/builder.js:62:1)
@crutchcorn
Copy link
Member

This seems related to #102. I will be addressing it while addressing #96 which currently relies on:

jimp-dev/jimp#815

Being merged

@crutchcorn crutchcorn added the bug label Nov 16, 2019
crutchcorn pushed a commit that referenced this issue Nov 16, 2019
Co-authored-by: Eryk Rakowski <[email protected]>

Fixes #108, replaces #102, closes #96
@crutchcorn
Copy link
Member

This should be solved in the 3.1.5 release

@ioannist
Copy link

I faced this problem with 0.16.1 and I was able to resolve it by calling

Jimp.default.read()

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

No branches or pull requests

3 participants