forked from bartvdbraak/blender
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.
This commit is contained in:
parent
f5ae5698d0
commit
d516fedba3
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user