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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user