Add ensureAlpha op, adds alpha channel if missing #1153

This commit is contained in:
Lovell Fuller
2019-01-05 21:12:33 +00:00
parent 8e70579e47
commit 4c01a099ea
9 changed files with 84 additions and 0 deletions

View File

@@ -30,6 +30,11 @@ namespace sharp {
*/
VImage RemoveAlpha(VImage image);
/*
Ensures alpha channel, if missing.
*/
VImage EnsureAlpha(VImage image);
/*
Alpha composite src over dst with given gravity.
Assumes alpha channels are already premultiplied and will be unpremultiplied after.