diff options
author | Jeroen Bakker <j.bakker@atmind.nl> | 2012-10-24 12:59:36 +0400 |
---|---|---|
committer | Jeroen Bakker <j.bakker@atmind.nl> | 2012-10-24 12:59:36 +0400 |
commit | b0fc0baafe44cdb6e9de7a8d0b497940e00a09d9 (patch) | |
tree | ff18b0853d6400f1ae44ae6bd9d092485cc0b969 /source/blender/compositor | |
parent | 0fb9b7bedaadd8454b60ef5f0f2897da1af29732 (diff) |
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
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/operations/COM_CropOperation.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_CropOperation.cpp b/source/blender/compositor/operations/COM_CropOperation.cpp index 925374c79ed..25a73799eff 100644 --- a/source/blender/compositor/operations/COM_CropOperation.cpp +++ b/source/blender/compositor/operations/COM_CropOperation.cpp @@ -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); + } } |