CONTENT-BASED WATERMARKING ROBUST TO BOTH AFFINE AND JPEG DISTORTIONS