if( x1 >= 0 && x1 < SrcWidth && y1 >= 0 && y1 < SrcHeight ) {
dst[x2 + y2*DstWidth]=src[x1+y1*SrcWidth];
}else{
dst[x2 + y2*DstWidth]]=0;
}