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

use pil resize #57

Merged
merged 5 commits into from
Jun 24, 2020
Merged

use pil resize #57

merged 5 commits into from
Jun 24, 2020

Conversation

geospatial-jeff
Copy link
Owner

@geospatial-jeff geospatial-jeff commented Jun 24, 2020

  • Uses PIL resize instead of skimage resize to lower memory footprint.
  • Expose resampling method to caller
from PIL import Image

async with COGReader("http://async-cog-reader-test-data.s3.amazonaws.com/webp_web_optimized_cog.tif") as cog:
    tile = await cog.read(..., resample_method=Image.CUBIC)

Closes #56

@codecov-commenter
Copy link

codecov-commenter commented Jun 24, 2020

Codecov Report

Merging #57 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #57      +/-   ##
==========================================
+ Coverage   95.53%   95.55%   +0.01%     
==========================================
  Files          11       11              
  Lines         762      765       +3     
==========================================
+ Hits          728      731       +3     
  Misses         34       34              
Impacted Files Coverage Δ
aiocogeo/cog.py 97.72% <100.00%> (+0.01%) ⬆️
aiocogeo/partial_reads.py 95.32% <100.00%> (+0.05%) ⬆️

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 b2b6e72...92f528d. Read the comment docs.

@geospatial-jeff geospatial-jeff merged commit c2af26c into master Jun 24, 2020
@geospatial-jeff geospatial-jeff deleted the pil-resize branch June 24, 2020 01:53
@geospatial-jeff geospatial-jeff mentioned this pull request Jun 24, 2020
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.

Reduce memory usage
2 participants