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

improve sharing large images #2020

Merged
merged 3 commits into from
Dec 15, 2023
Merged

improve sharing large images #2020

merged 3 commits into from
Dec 15, 2023

Conversation

r10s
Copy link
Member

@r10s r10s commented Dec 15, 2023

the reason that sharing (mostly) panoramas does not work is that they are pretty large - sth. as 16382 x 3690 pixels, needing 180+ mb pixel data in core before recoding - where extensions are limited to 120 mb by iOS.

this PR uses UI to scale images to "1280 pixels max width or height", so that scaling in core should not be needed most times. scaling in UI consumes less memory - or that memory is not counted to the 120 mb.

closes #1330
closes deltachat/deltachat-core-rust#2681

extensions must not use more than 120mb of memory,
this is easily exhausted by core scaling down images.

using iOS function for scaling use less memory (or the memory is not counted)
and avoids this error.

although we accept various formats of images,
in practise i've seen them passing to the extension only as URL,
if we see that for other formats as well, we can optimize the other branches,
currently, that seems not to be needed.
@r10s r10s marked this pull request as ready for review December 15, 2023 14:50
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

Successfully merging this pull request may close these issues.

improve memory consumption while image processing sharing panoramas not working
3 participants