Regression in v0.31.3: linear filter is not applied correctly to 16-bit images #3605
Closed
3 tasks done
Labels
Milestone
Possible bug
Is this a possible bug in a feature of sharp, unrelated to installation?
npm install sharp
completes without error.node -e "require('sharp')"
completes without error.Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?System:
OS: Windows 10 10.0.19044
CPU: (8) x64 Intel(R) Core(TM) i7-8565U CPU @ 1.80GHz
Memory: 4.98 GB / 15.75 GB
Binaries:
Node: 19.6.0 - C:\Program Files\nodejs\node.EXE
Yarn: 1.22.19 - ~\AppData\Roaming\npm\yarn.CMD
npm: 9.4.0 - C:\Program Files\nodejs\npm.CMD
npmPackages:
sharp: ^0.32.0 => 0.32.0
What are the steps to reproduce?
What is the expected behavior?
The expected behavior is that the linear filter is applied to the image with the expected result. Instead the output image is completely black. This issue occurred in the version 0.31.3. My guess is that the reson for this issue is setting the option to "uchar" when applying linear.
See src/operations.cc row 148:
return RemoveAlpha(image).linear(a, b, VImage::option()->set("uchar", TRUE)).bandjoin(alpha);
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Please provide sample image(s) that help explain this problem
Original
Output
The text was updated successfully, but these errors were encountered: