Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeroen Bakker <j.bakker@atmind.nl>2012-10-24 12:59:36 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-10-24 12:59:36 +0400
commitb0fc0baafe44cdb6e9de7a8d0b497940e00a09d9 (patch)
treeff18b0853d6400f1ae44ae6bd9d092485cc0b969 /source/blender/compositor/operations
parent0fb9b7bedaadd8454b60ef5f0f2897da1af29732 (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/operations')
-rw-r--r--source/blender/compositor/operations/COM_CropOperation.cpp9
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);
+ }
}