lovell/avif-cli

Enhancement: add support for passing through metadata, including EXIF orientation

3xploiton3 opened this issue · 4 comments

lovell commented

Hello, the current semver range is wide enough to include the latest version, so you might need to update your lockfile e.g. via npm upgrade or similar.

"sharp": "^0.31.1",

thanks it work, but little problem here

i tried compress this image
result image become rotated to landscape,

image

command:
npx avif --quality=30 --verbose

lovell commented

This input image is landscape and contains an EXIF Orientation that results in some software rotating it by 90 degrees clockwise.

I guess we'll need to either add a command line flag to rotate e.g. --auto-orient, or a flag to pass through all metadata e.g. --with-metadata, which would use withMetadata(). I think the latter might be more useful as this will include XMP etc.

I'll label this as a future possible enhancement. Happy to accept a PR, if you're able.