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

feat(sharp): more resize options #355

Merged

Conversation

RAX7
Copy link
Contributor

@RAX7 RAX7 commented Sep 16, 2022

This PR contains a:

  • bugfix
  • new feature
  • code refactor
  • test update
  • typo fix
  • metadata update

Motivation / Use-Case

Pass all resizing parameters to the sharp implementation

see: https://sharp.pixelplumbing.com/api-resize#parameters

e.g:

options: {
  resize: {
    fit: "contain",
    background: [0, 255, 0] // rgb(0, 255, 0)
  }
}

Pass all resizing parameters to the "sharp" implementation
see: https://sharp.pixelplumbing.com/api-resize#parameters
e.g:
```js
options: {
  resize: {
    fit: "contain",
    background: [0, 255, 0] // rgb(0, 255, 0)
  }
}
```
@codecov
Copy link

codecov bot commented Sep 16, 2022

Codecov Report

Base: 88.24% // Head: 88.26% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (cc36798) compared to base (c3c4a30).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #355      +/-   ##
==========================================
+ Coverage   88.24%   88.26%   +0.01%     
==========================================
  Files           4        4              
  Lines         672      673       +1     
  Branches      258      259       +1     
==========================================
+ Hits          593      594       +1     
  Misses         71       71              
  Partials        8        8              
Impacted Files Coverage Δ
src/utils.js 80.93% <100.00%> (+0.05%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@RAX7 RAX7 mentioned this pull request Sep 16, 2022
6 tasks
@alexander-akait alexander-akait merged commit d365db3 into webpack-contrib:master Sep 16, 2022
@RAX7 RAX7 deleted the sharp-more-resize-options branch September 16, 2022 16:04
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.

None yet

2 participants