The present invention operates as an expert system to automatically determine
an optimal method for reducing the size of an electronic file containing at least
one embedded image by determining optimal methods for compressing each image. Further,
in one embodiment, linked images are also compressed. User control of relevant
parameters such as image compression options, retention or removal of unnecessary
data associated with embedded or linked images, and downsampling images to better
match the output resolution of specific output devices is provided in further embodiments.
Further, to prevent cumulative degradation of images through repeated lossy compression,
images that have already been compressed or optimized are preferably flagged so
that they are not compressed more than once.