So I found I should apply transform to image range too.
After that I can decide, what to do if an image corner is not at the beginning of coordinates.
I = imread('cameraman.png');
XData=[1 size(I,2)];
YData=[1 size(I,1)];
imshow(I);
xform = [1 2 0; 2 1 0; 100 0 1];
T = maketform('affine',xform);
[XData1, YData1] = tformfwd(T, XData, YData);
if XData1(1)>1
XData1(1)=1;
end
if YData1(1)>1
YData1(1)=1;
end
I2 = imtransform(I,T,'XData',XData1,'YData',YData1);
figure, imshow(I2)