diff options
author | Lukas Tönne <lukas.toenne@gmail.com> | 2014-02-18 21:55:35 +0400 |
---|---|---|
committer | Lukas Tönne <lukas.toenne@gmail.com> | 2014-02-18 22:01:04 +0400 |
commit | d516fedba3ce57b2ca7bd537b64b31bd0ca3c6bb (patch) | |
tree | ab8a460226dac723d61c6d0dc2a8be74a825f0d0 /source/blender/compositor | |
parent | f5ae5698d006b83a48b902bc5af7b1370f6518db (diff) |
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.
Diffstat (limited to 'source/blender/compositor')
-rw-r--r-- | source/blender/compositor/operations/COM_RotateOperation.cpp | 4 |
1 files 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() |