Uint16Array copy from 16bit ushort raw Buffer read , But produce different result with API #3808
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.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
?System:
OS: macOS 13.5.2
CPU: (8) arm64 Apple M1
Memory: 72.86 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 16.19.1 - ~/.nvm/versions/node/v16.19.1/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 9.6.4 - ~/.nvm/versions/node/v16.19.1/bin/npm
pnpm: 7.16.1 - ~/Library/pnpm/pnpm
npmPackages:
sharp: v0.32.6 => 0.32.6
What are the steps to reproduce?
.raw({ depth: 'ushort' })
data.readUint16BE(pixelIndex);
What is the expected behaviour?
the pic show same with api result
await sharp(path).toColorspace('grey16').png({progressive: false, force: true}).withMetadata({icc: 'p3'}).toFile('__local/16bit_copy.png');
Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Please provide sample image(s) that help explain this problem
sample_01
input
Imageoutput
Imageoutput by api
Imagesharp(path).toColorspace('grey16').png({progressive: false, force: true}).withMetadata({icc: 'p3'})

sample_02
input
Imageoutput
Imageoutput by api
Imagesharp(path).toColorspace('grey16').png({progressive: false, force: true}).withMetadata({icc: 'p3'})

The text was updated successfully, but these errors were encountered: