You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Run code sample in node.js against provided image. It is correctly trimmed in 0.30.7, but not in 0.31.0. Interestingly, when trimming sharp(await instance.toBuffer()) trimming works as expected.
What is the expected behaviour?
Test image should be trimmed just like on 0.30.7
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
constsharp=require('sharp');(async()=>{constinstance=sharp('./test.png');constmeta=awaitinstance.metadata();console.log(meta);const{ data, info }=awaitinstance.trim().toBuffer({resolveWithObject: true});console.log(info);// trimOffsetLeft is 0console.log(data.toString('base64'));})();
Please provide sample image(s) that help explain this problem
The text was updated successfully, but these errors were encountered:
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.If you cannot confirm both of these, please open an installation issue instead.
Are you using the latest version of sharp?
sharp
as reported bynpm view sharp dist-tags.latest
.If you cannot confirm this, please upgrade to the latest version and try again before opening an issue.
If you are using another package which depends on a version of
sharp
that is not the latest, please open an issue against that package instead.What is the output of running
npx envinfo --binaries --system --npmPackages=sharp --npmGlobalPackages=sharp
?What are the steps to reproduce?
Run code sample in node.js against provided image. It is correctly trimmed in 0.30.7, but not in 0.31.0. Interestingly, when trimming
sharp(await instance.toBuffer())
trimming works as expected.What is the expected behaviour?
Test image should be trimmed just like on 0.30.7
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Please provide sample image(s) that help explain this problem
The text was updated successfully, but these errors were encountered: