Image appears tilted, need to fix it

Hello,

I am presenting 2 images side by side, but they appear tilted, without any explicit command from me. Please help me solve this issue -
Code as typed ----

%image size setup
cmtopixratio = 1280/37.478; % horizontal resolution/horizontal display size in cm
disFromScreen = 60cmtopixratio;
imageAspectRatio = 1;
VisualAngle = 10
pi / 180;
Eccentricity = 0.75pi / 180;
horizontalVisualAngle = VisualAngle
imageAspectRatio;
verticalHalfLength = disFromScreentan(VisualAngle/2);
horizontalHalfLength = disFromScreen
tan(VisualAngle/2);
horizontalGap = disFromScreen * tan(Eccentricity);

h1 = floor(xCenter-0.75horizontalHalfLength);
h2 = floor(xCenter+0.75
horizontalHalfLength);
v1 = floor(yCenter-0.75verticalHalfLength);
v2 = floor(yCenter+0.75
verticalHalfLength);

%image presentation
image = [image1 image2]; %vector of texture pointers
rect1 = CenterRectOnPointd([h1 v1 h2 v2], xCenter-(h2-h1)*0.75, yCenter)’;
rect2 = CenterRectOnPointd([h1 v1 h2 v2], xCenter+(h2-h1)*0.75, yCenter)’;
rect = [rect1 rect2];
Screen(‘DrawTextures’, window, image,[],rect,1);
tstart = Screen(‘Flip’, window);

Your DrawTextures command specifies a rotation angle of 1 degrees, so that’s why they tilt.

1 Like

@mariokleiner thanks for pointing it out.