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

large memory consumption and low quality #35

Closed
jdevp opened this issue Jan 28, 2023 · 1 comment
Closed

large memory consumption and low quality #35

jdevp opened this issue Jan 28, 2023 · 1 comment

Comments

@jdevp
Copy link

jdevp commented Jan 28, 2023

Hi, it's a good job to start with. However, I see the following issues.

  1. Low quality image captured if given ratio 1. If I scale the image based on device pixel ratio, the image becomes very large to save. It quickly uses up a lot of memory if I use 'png' format which causes app crashes. It seems to work fine with 'rawrgba' format but the size is very large.
  2. The method 'toImageSync' app crashes due to memory usage as well. It works with by using 'toImage'.

I don't know if there is a way to solve those issues by using isolates.

@ueman
Copy link
Contributor

ueman commented Jul 7, 2024

Low quality image captured if given ratio 1. If I scale the image based on device pixel ratio, the image becomes very large to save. It quickly uses up a lot of memory if I use 'png' format which causes app crashes. It seems to work fine with 'rawrgba' format but the size is very large.

That's expected though. If you lower the quality, you get a lower quality result. On the other hand, raising the quality results in a larger file which requires more computation effort.

The method 'toImageSync' app crashes due to memory usage as well. It works with by using 'toImage'.

Again, that's kinda expected. If you record too much, you will run out of memory.

I don't know if there is a way to solve those issues by using isolates.

Isolates don't lower memory requirements, but they may speed up computations. There's a branch in which I did some experiments. Feel free to pick it up. See #30

@ueman ueman closed this as completed Jul 7, 2024
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