-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
canvas.loadImage(src) got exception "Out of memory" #1735
Comments
also getting the same problem |
I can't reproduce this issue. The image loads successfully for me, with about 33,661,225 bytes of ArrayBuffers allocated. Can you provide more info please? |
Just run the above function then my app still crashed
He got the same problem. @zbjornson what kind of information do you want more? |
I also have the same problem, the code is very simple:
I reproduced this 100% both on Mac and Linux, at the same time - images with greater size (more than 10Mb) processing without problems, the problems are only with such certain images. Stacktrace:
|
panel.body = await loadImage(process.cwd() + "/src/img/none/body.png");
panel.banner = {};
panel.banner.front = await loadImage(process.cwd() + "/src/img/none/banner-front.png");
panel.banner.back = await loadImage(process.cwd() + "/src/img/none/banner-back.png");
panel.avatar = {};
panel.avatar.front = await loadImage(process.cwd() + "/src/img/none/avatar-front.png");
panel.avatar.back = await loadImage(process.cwd() + "/src/img/none/avatar-back.png");
const wallpaper = await loadImage(process.cwd() + "/src/img/blurple.png");
const avatar = await loadImage(process.cwd() + "/src/img/blurple.png"); got this..
|
I'm aware it woudln't help for every case. But after looking for a solution for so many time. I finally find a work around ... |
@zbjornson We have the same issue with version import { loadImage } from "canvas";
loadImage(
"https://drive.usercontent.google.com/uc?id=1W06MmK-FCYGr1OLdH5ydH1huaFJRL1q0&export=download",
).then(console.log);
loadImage(
"https://drive.usercontent.google.com/uc?id=1QJAt2l3xozu2XUntQLIdZM_CSSBOKDiE&export=download",
).then(console.log);
|
Issue or Feature
Hi, I had trouble with load image by canvas that always got out of memory exception.
My device still can load image has size larger than 80MB without any problem except this image (16.8MB)
https://pbimg.btdmp.com/pbase/shop-id/10117363/artworks/2141699b41cb8b5b454ffbd0380e247b.png
Steps to Reproduce
Exception:
Your Environment
The text was updated successfully, but these errors were encountered: