Open thatsmydoing opened 3 years ago
Hi, this would need exposing in libvips first, plus there's complexity around animated WebP images where each frame can be either lossy or lossless.
webp also allows different parts of the same image to be lossy or lossless -- it's common to have a lossless alpha and a lossy RGB, for example.
webp also allows different parts of the same image to be lossy or lossless -- it's common to have a lossless alpha and a lossy RGB, for example.
If lossiness is going to be a simple boolean: if any part of an image is lossy, the image as a whole is effectively lossy. In other words, you shouldn't consider a image that is partly lossless, to be entirely lossless.
Could there be metadata to tell whether an input webp (or heif/avif) image is lossy or lossless? The context is we would like to preserve the lossiness when transforming images. Not just for webp -> webp but when getting an input webp, figuring out whether we should convert it to JPEG or PNG depending if it's lossy or not.
Maybe something like a
lossless
boolean as part of the input metadata?