Updated crop image setting to make every pixel outside the crop black as

it is expected.

Fix for [#32955] Compositer "Crop" node option "Crop Image Size" doesn't
really crop the input image
This commit is contained in:
Jeroen Bakker
2012-10-24 08:59:36 +00:00
parent 0fb9b7beda
commit b0fc0baafe

View File

@@ -114,5 +114,12 @@ void CropImageOperation::determineResolution(unsigned int resolution[2], unsigne
void CropImageOperation::executePixel(float output[4], float x, float y, PixelSampler sampler)
{
this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler);
if (x >= 0 && x < getWidth() && y >= 0 && y < getHeight())
{
this->m_inputOperation->read(output, (x + this->m_xmin), (y + this->m_ymin), sampler);
}
else
{
zero_v4(output);
}
}