The watermarking algorithms based on wavelet transform have received more and more attention since the wavelet transform matches the human vision system model. however, the wavelet transform does not have the ability of geometric resistance. so must of the proposed watermarking algorithms based on wavelet transform are not resistant to geometric attack. for instance, the detection of watermark fails if the watermarked image is rotated by a very small angle. in order to add the ability of geometric resistance to waveled based watermarking algorithms, a blind digital watermaking algorithm based on integer wavelet transform is proposed in this paper. in this algorithm, a template is embedded into the watermaked color image. using the template, the color image can be correct after the geometric attack to make the watermaking detection and embedding courses be synnchronization again. in this way the watermark could be extracted exactly. the experiment result show that this algorithm is robust and effective to geometric attack.