Skip to content

Critical Issue: .png files over 1mb visually corrupt. #16

Description

@soulus98

Only seeming to happen to .png Pokemon GO screenshots over 1mb grabbed from discord.
I can't even begin to understand what is going on here but this is the code that is failing:

const imgCanv = Canvas.createCanvas(image.width,image.height);	//size of canvas
const ctx = imgCanv.getContext("2d");
const background = await Canvas.loadImage(image.url);
ctx.drawImage(background,0,0,imgCanv.width,imgCanv.height);

Through a bunch of tests, it seems that Canvas.loadImage is doing it.
It must be my version of Node or a dependency that is doing it, but it is weird that it only happens to certain images.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions