Add support for input floating point images. Patch provided by Jim Tilander. See issue 27.

This commit is contained in:
castano
2008-05-15 06:18:24 +00:00
parent aebcea412c
commit 70267fda15
6 changed files with 91 additions and 13 deletions

View File

@ -862,3 +862,20 @@ void FloatImage::applyKernelHorizontal(const PolyphaseKernel & k, int y, int c,
}
}
FloatImage* FloatImage::clone() const
{
FloatImage* copy = new FloatImage();
copy->m_width = m_width;
copy->m_height = m_height;
copy->m_componentNum = m_componentNum;
copy->m_count = m_count;
if(m_mem)
{
copy->allocate(m_componentNum, m_width, m_height);
memcpy(copy->m_mem, m_mem, m_count * sizeof(float));
}
return copy;
}