feat: add experimental unflatten handler for image processing#248
feat: add experimental unflatten handler for image processing#248nathanchase wants to merge 2 commits intounjs:mainfrom
Conversation
|
Thanks for PR dear @nathanchase. Wondering is it worth to wait for sharp feature to be stable first? Do you have some more context why it is in experimental state? |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #248 +/- ##
==========================================
+ Coverage 56.02% 56.18% +0.16%
==========================================
Files 14 14
Lines 1203 1212 +9
Branches 83 84 +1
==========================================
+ Hits 674 681 +7
- Misses 526 528 +2
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
I don't have any knowledge of why it's experimental. I just know that I have an immediate use case for it with https://github.com/nuxt/image to make all images with a solid white background become transparent backgrounds. I happened to notice it wasn't wired up to sharp's implementation, so this was just meant as a means of connecting to the |
|
For what it's worth, |
This pull request introduces a new handler function to the
src/handlers/handlers.tsfile. The new function,unflatten, is experimental and its API may change in the future.New handler function added:
src/handlers/handlers.ts: Added theunflattenhandler, which calls theunflattenmethod on the providedpipe. This feature is marked as experimental.See https://sharp.pixelplumbing.com/api-operation#unflatten for more information.