Lossy Image formats Part 1: JPEG Compression and Digital Watermarking
Jpeg compression is a great tool for reducing image files sizes. It allows you to post larger images on the web and email an image that’s large enough to produce a good quality print. With Jpeg compression you have a trade-off between image quality and compression – better image quality, less compression and vice versa.
Most people using Jpeg don’t realize that their image is being changed unless they see the affects of very heavy compression or they compress non-photographic artwork with hard edges like an illustration or line art. Simply put, Jpeg works by sampling areas of an image that the human eye has trouble discerning into larger blocks. Depending on the image and compression the detail in these areas are lost as larger blocks of a single color are used to maximize compression.
The following were created using Photoshop CS4 and the “Save for Web & Devices” option under the File menu. “Save for Web” is very handy since you can compare originals to compressed finals. This is important because when you use “Save As” jpeg from the Photoshop menu, the on screen image does not change to reflect the changes that occurred during the compression.
No Compression at 200%
The image is pixilated due to the 200% scale
Medium Jpeg Compression at 200%
Notice that the blocks of color are beginning to show in the red drapes to the left of the candle flame and the white vase is having some issues with color.
Low Jpeg Compression at 200%
The number of blocks has greatly increased and more color issues are occurring as the Jpeg algorithm samples details into larger blocks.
As you can see, the more you compress, the more image detail you lose, which is why Jpeg is considered a Lossy Data Compression method.
So how does this affect digital watermarking? As you are aware, when you embed a digital watermark, it is essentially woven into the image. When you save as Jpeg – specifically when using high compression to get very small files – you are not only losing image data, but the watermark as well. When verifying a watermark a common mistake is to check the on-screen image after using “Save as” jpeg, but this does not check the watermark after Jpeg compression. To verify the watermarks in Jpeg images you must open the saved Jpeg and use the plug-in to read the watermark.
Typically, I find using maximum Jpeg image quality, 10-12 with “Save as” and 90-100 with “Save for Web & Devices” that the watermark intensity is very close to the original result from a non-compressed image. Depending on your images and the amount of compression, you may find that you need to increase the watermark strength when embedding, and/or increase the image quality and file size of the Jpeg compression.
Just remember to test the actual Jpeg compressed file so your watermarks will work as expected when you post them to the web.

