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

Behavior changes - The default query image size now changed to PHImageManagerMaximumSize #16

Merged
merged 3 commits into from
Jul 10, 2020

Conversation

dreampiggy
Copy link
Collaborator

This is because the previous version use SDWebImagePhotosPixelSize, which may return a larger size beyond system RAM limit.

For Example, if you use SDWebImagePhotosPixelSize to query an iPhone 5K Deep Depth Photo, iOS will return nearly 8000x8000 pixels, cause a high rate of OOM.

Use PHImageManagerMaximumSize, can only return you nearly 4000x4000 pixels, suitable for current iPhone's display.

This change is noticable, but it's suitable for most of common cases, we still query the as large as possible to original image by default. Only try to workaround with that OOM issue.

…Size, which may be more RAM friendly on iOS devices. (Smaller than SDWebImagePhotosPixelSize)
@dreampiggy dreampiggy added OOM behavior Behavior Changes labels Jul 10, 2020
@codecov
Copy link

codecov bot commented Jul 10, 2020

Codecov Report

Merging #16 into master will increase coverage by 1.85%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #16      +/-   ##
==========================================
+ Coverage   61.85%   63.70%   +1.85%     
==========================================
  Files           3        3              
  Lines         270      270              
==========================================
+ Hits          167      172       +5     
+ Misses        103       98       -5     
Flag Coverage Δ
#iOS 63.70% <0.00%> (+1.85%) ⬆️
Impacted Files Coverage Δ
...ses/PHImageRequestOptions+SDWebImagePhotosPlugin.m 75.00% <0.00%> (ø)
...WebImagePhotosPlugin/Classes/SDImagePhotosLoader.m 60.36% <0.00%> (+2.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38db280...fa474ec. Read the comment docs.

@dreampiggy dreampiggy merged commit 9722ac8 into master Jul 10, 2020
@dreampiggy dreampiggy deleted the behavior_default_image_size branch July 10, 2020 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
behavior Behavior Changes OOM
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant