41
41
void SuperImpose::filterImage()
46
48
int templateWidth = m_template.width();
47
49
int templateHeight = m_template.height();
49
51
// take selection of src image and scale it to size of template
50
52
m_destImage = m_orgImage.smoothScaleSection(m_selection.x(), m_selection.y(),
51
m_selection.width(), m_selection.height(), templateWidth, templateHeight);
53
m_selection.width(), m_selection.height(), templateWidth, templateHeight);
53
55
// convert depth if necessary
54
56
m_template.convertToDepthOfImage(&m_destImage);
56
58
// get composer for compositing rule
58
60
DColorComposer::MultiplicationFlags flags = DColorComposer::NoMultiplication;
59
62
if (m_compositeRule != DColorComposer::PorterDuffNone)
60
64
flags = DColorComposer::MultiplicationFlagsDImg;
62
67
// do alpha blending of template on dest image
63
68
m_destImage.bitBlendImage(composer, &m_template, 0, 0, templateWidth, templateHeight, 0, 0, flags);