
The images tools provide a powerful toolset for image management and editing within PDF documents. There are three ways to perform image manipulation:
The tool supports device, indexed, calibrated Gray, RGB, and CMYK. However, Separation, Lab, DeviceN, ICCBased, and combinations such as IndexedCalibrated color spaces are only partially supported. If operations on these color spaces are required, then just convert the images to one of the supported color spaces.
When using the image editing tools, you have a number of compression filters available, including ZIP, LZW, JPEG and Run Length. You will need to experiment to determine which method gives you the best combination of quality and file size. The compression filters can be broken down into two classes:
ZIP. ZIP encoding, like LZW encoding, discovers and exploits many patterns in its input data. Thanks to its cascaded adaptive Huffman coding, ZIP-encoded output is usually substantially more compact than LZW-encoded output for the same input. ZIP and LZW decoding speeds are comparable, but ZIP encoding speed is considerably slower than LZW encoding speed.
LZW. LZW compression can discover and exploit many patterns in its input data. The compression obtained using the LZW method varies from file to file; the best case (a file of all zeros) provides a compression approaching 1365:1 for long files, while the worst case (a file in which no pair of adjacent characters appears twice) can produce an expansion of approximately 50%.
JPEG. Using JPEG compression, color and grayscale images can be compressed by a factor of 10 or more and is ideal for working with photos. The JPEG filter supported by PDF is a lossy filter. JPEG encoding provides very significant compression of color and grayscale images, but because it is a lossy compression it is not appropriate in all circumstances. Screenshots, in particular, are often unacceptable when JPEG encoded. This happens because each pixel in a screenshot is usually significant, and the loss or alteration of just a few pixels can drastically alter the appearance of the screenshot. Unlike screenshots, the effect of JPEG encoding on continuous-tone images is typically acceptable, particularly when high compression is not demanded.
Run Length. Run-length encoding is a compression technique that works best for black-and-white or line art images. It works by replacing "runs" of the same color with a single character. The more runs there are, and the longer the run sequence, the greater the compression.