include new parameters bg and align to the SHA
implement background color fill

For example, bg=00ff0080 is transparent green. If alpha is not supported, flatten on white bg.