Open tats-u opened 1 year ago
For AVIF, libheif exposes subsampling metadata via get_image_chroma_from_configuration but we'd need to add support for this to libvips first. There might be some complexity around different chroma subsampling for alpha vs non-alpha channels.
A libvips PR to expose this would be welcome, if you're able.
For WebP, libwebp does not expose metadata about whether subsampling (a.k.a. "sharp_yuv") was used at compression time, so there's not a lot we can do here (I suspect it will be buried somewhere in the compressed bitstream).
we'd need to add support for this to libvips first.
I see.
For WebP, libwebp does not expose metadata about whether subsampling (a.k.a. "sharp_yuv") was used at compression time
4:2:0 for ALL lossy WebP whether sharp YUV is used or not unlike JPEG or AVIF. Lossless ones use a different algorithm.
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?
What is the expected behaviour?
should include
chromaSubsampling
field like JPEG. That of Lossy WebPs is always"4:2:0"
. Most AVIF use YUV (4:2:0 or 4:4:4).Please provide a minimal, standalone code sample, without other dependencies, that demonstrates this problem
Please provide sample image(s) that help explain this problem