Skip to content

avifenc: add --noalpha flag to discard alpha channel on encode#3130

Open
enyetsuen wants to merge 2 commits intoAOMediaCodec:mainfrom
enyetsuen:feature/no-alpha-flag
Open

avifenc: add --noalpha flag to discard alpha channel on encode#3130
enyetsuen wants to merge 2 commits intoAOMediaCodec:mainfrom
enyetsuen:feature/no-alpha-flag

Conversation

@enyetsuen
Copy link
Copy Markdown

Adds an option to avifenc to ignore and discard any alpha channel present in the input image and encode the output as fully opaque. This is useful for cases where input assets contain unintended or accidental alpha channels (for example, PNGs exported by certain tools that always include an alpha plane), but the final AVIF output is intended to be RGB-only. Also helps with avoiding unnecessary alpha processing overhead during encoding.

The feature aligns with existing behavior in encoders such as WebP's cwebp, which already provides a -noalpha option to discard transparency when it is not required.

It was also requested by users at #1665

Comment thread apps/avifenc.c Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants