// taken care of above. Rationale: Even if you could imagine
// e.g. an effect that took in an image and set alpha=1.0
// unconditionally, it wouldn't make any sense to have it as
// taken care of above. Rationale: Even if you could imagine
// e.g. an effect that took in an image and set alpha=1.0
// unconditionally, it wouldn't make any sense to have it as
// got its input pre- or postmultiplied, so it wouldn't know
// whether to divide away the old alpha or not.
Effect::AlphaHandling alpha_handling = node->effect->alpha_handling();
// got its input pre- or postmultiplied, so it wouldn't know
// whether to divide away the old alpha or not.
Effect::AlphaHandling alpha_handling = node->effect->alpha_handling();
alpha_handling == Effect::DONT_CARE_ALPHA_TYPE);
// If the node has multiple inputs, check that they are all valid and
alpha_handling == Effect::DONT_CARE_ALPHA_TYPE);
// If the node has multiple inputs, check that they are all valid and
// If the effect has asked for premultiplied alpha, check that it has got it.
if (any_postmultiplied) {
node->output_alpha_type = ALPHA_INVALID;
// If the effect has asked for premultiplied alpha, check that it has got it.
if (any_postmultiplied) {
node->output_alpha_type = ALPHA_INVALID;
Node *conversion = add_node(new AlphaDivisionEffect());
connect_nodes(output, conversion);
propagate_alpha();
Node *conversion = add_node(new AlphaDivisionEffect());
connect_nodes(output, conversion);
propagate_alpha();