Fragile watermarking techniques are developed to ensure the credibility and integrity of images in open communication channels. Many related studies have proposed methods for accurately localizing tampered areas, but the ability to recover such areas has received less attention. Therefore, we propose a content-based fragile watermarking technique that can both accurately localize tampered areas and correct them in details, using embedded content-based watermarks. Our scheme provides a novel watermark structure. It adopts JPEG-compressed watermark prototypes and categorizes them into smooth, mid-textured, and textured areas. To resist forged-watermark attacks and promote self-recovery ability, the relationships among blocks are created by a toral automorphism with an asymmetric key structure. Furthermore, the watermark prototypes are disordered by a one-way hashing function and encrypted by a public-key encryption function to increase the security of watermarks. Finally, the watermarks are embedded to protect the integrity of images. Experiments show that the proposed scheme can correctly localize tampered areas and remedy them to the extent of JPEG-compression quality even when 50% of the image is cropped, and resist forged-watermark attacks.