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

Memory issue with large images #4

Open
shcmack opened this issue Feb 5, 2021 · 3 comments
Open

Memory issue with large images #4

shcmack opened this issue Feb 5, 2021 · 3 comments

Comments

@shcmack
Copy link

shcmack commented Feb 5, 2021

This script is pretty cool man! However, when trying to use this on large images (5000x4000 px) I get "Error code: Out of Memory" in the browser. I do have enough RAM, and I've tried with different browsers, so I'm not sure where the issue lies. The reason for the huge image-size is to get high resolution outputs. Is there any workaround for this?

@michaelbromley
Copy link
Owner

Hi!
Thanks. Is there a stack trace with the error message?

@shcmack
Copy link
Author

shcmack commented Feb 7, 2021

It doesn't output any, however it seems the reason for the crash is that all browsers have a memory limitation per tab (https://js9.si.edu/js9/help/memory.html). It might be possible to hack some workaround within the script, but that's above my skill level.

@michaelbromley
Copy link
Owner

I think the memory limit may even be specific to something we are doing with the canvas element, since a 4GB tab limit seems easily enough even to work with a 5000x4000 bitmap.

Unfortunately I've not got time at the moment to dive into this - I wish I could spend time on these fun experiments but these days I'm spending all my time building stuff that might make money 😂

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

2 participants