From d516fedba3ce57b2ca7bd537b64b31bd0ca3c6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lukas=20T=C3=B6nne?= Date: Tue, 18 Feb 2014 18:55:35 +0100 Subject: [PATCH] Fix T38488: Single pixel line artifact with Rotate and Wrapped Translate nodes. The Rotate node was calculating the center with a 1 pixel offset, which effectively shifts the image by 1 pixel on one or both axis for right-angle (90 degree) rotations. Note that the wrapping feature for translate nodes can still produce undesirable results for non-quadratic images. This is because of how the resolution calculation works atm: the Rotate node will keep the resolution of the input image, even if the resulting image is then cropped or leaves empty margins. There is no easy way to fix that without redesign. --- source/blender/compositor/operations/COM_RotateOperation.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/blender/compositor/operations/COM_RotateOperation.cpp b/source/blender/compositor/operations/COM_RotateOperation.cpp index c6ad87bbf97..6aca9fe22c4 100644 --- a/source/blender/compositor/operations/COM_RotateOperation.cpp +++ b/source/blender/compositor/operations/COM_RotateOperation.cpp @@ -38,8 +38,8 @@ void RotateOperation::initExecution() { this->m_imageSocket = this->getInputSocketReader(0); this->m_degreeSocket = this->getInputSocketReader(1); - this->m_centerX = this->getWidth() / 2.0; - this->m_centerY = this->getHeight() / 2.0; + this->m_centerX = (getWidth() - 1) / 2.0; + this->m_centerY = (getHeight() - 1) / 2.0; } void RotateOperation::deinitExecution()