Optimize scanned images for retrieval speed and disk space savings in ProDOC