auto etype = ElemInfo( 1, DataType.INT );
auto dst = Image( ivec2(4,4), etype );
auto src = Image( ivec2(3,2), etype, [ 1,2,4, 5,6,8 ] );
imCopy( dst, ivec2(-1,-1), src, ImRepack.ROT90 );
assertEq( dst.mapAs!int, [ 6,0,0,0,
5,0,0,0,
0,0,0,0,
0,0,0,0 ] );
imCopy( dst, ivec2(2,1), src, ImRepack.ROT180 );
assertEq( dst.mapAs!int, [ 6,0,0,0,
5,0,8,6,
0,0,4,2,
0,0,0,0 ] );
imCopy( dst, ivec2(-1,3), src, ImRepack.MIRVER );
assertEq( dst.mapAs!int, [ 6,0,0,0,
5,0,8,6,
0,0,4,2,
6,8,0,0 ] );auto etype = ElemInfo( 1, DataType.INT );
auto dst = Image( ivec2(2,2), etype );
auto src = Image( ivec2(3,3), etype, [ 1,2,4, 5,6,8, 9,7,3 ] );
imCopy( dst, ivec2(-1,-1), src, CrdRegionD(0,0,3,3) );
assertEq( dst.mapAs!int, [ 6,8,
7,3 ] );auto etype = ElemInfo( 1, DataType.INT );
auto dst = Image( ivec3(2,2,2), etype );
auto src = Image( ivec!1(2), etype, [ 1,2 ] );
imCopy( dst, ivec3(0,0,0), src, ImRepack.NONE );
assertEq( dst.mapAs!int, [1,2, 0,0, 0,0, 0,0] );
imCopy( dst, ivec3(0,0,0), src, ImRepack.ROT270 );
assertEq( dst.mapAs!int, [1,2, 2,0, 0,0, 0,0] );
dst.clear();
imCopy( dst, ivec3(0,0,0), src, ImRepack.ROT90, [0,2] );
assertEq( dst.mapAs!int, [2,0, 0,0, 1,0, 0,0] );