A novel blind logo-watermarking algorithm for copyright protection of JPEG-compressed images is proposed. A visually meaningful grayscale logo is encoded by the (255, 9) BCH code into a codeword that is embedded as the watermark into the wavelet domain of the host image using a pixel-wise masking model. A trellis is generated with a specific path corresponding to that codeword. At the receiving end where the watermarked image is stored in a JPEG file, the codeword is recovered approximately through running the viterbi decoder on the trellis even without reference to the original host data, and then decoded back to the embedded logo by the (255, 9) BCH codec. Thanks to the BCH code's powerful error correction capability and human vision system's great tolerance to image noise, the extracted logo, possibly degraded, contains much more convincing information than that of a randomly-generated numerical sequence that is widely used in traditional watermarking strategies. Experimental results of successfully hiding a 32 × 32, grayscale logo into 512 × 512 JPEG-compressed images verify our algorithm's practical performance.