Many electronic watermarks for still images are sensitive to geometric distortions. A novel watermarking algorithm is proposed for resisting geometric attacks to the images . The algorithm identifies the shape-specific points (SSP) from a watermarked image and uses the SSP to estimate the parameters of the geometric transformations undergone by the image. During the watermark detection process, these transformations are inverted based on the parameters. Synchronization can then be realized, which is crucial for watermark detection. Experimental results show that this watermark algorithm has very strong capability for resisting scaling, rotation, cropping, Gaussian noise, and JPEG compression attacks.