Semi-fragile watermarking can be used to detect illegal and local manipulation of images, while being robust towards legal manipulations such as lossy compression. This paper describes a gametheoretic approach to design a blind semi-fragile watermarking system based on the Scalar Costa Scheme. A natural choice for the game criterion is a false alarm probability, i.e. the probability to still detect the watermark, even if part of the data has been replaced. Optimal embedding strategy is then derived in presence of a legal processing (e.g. lossy compression, through some model). Finally, the results are applied to design an efficient DCT semifragile watermarking system which allows to detect local forgery signals in spite of JPEG compression.