Adding the new version of CompressImage