Bloom.Book.ImageUpdater.CompressImages C# (CSharp) Method

CompressImages() public static method

public static CompressImages ( string folderPath, IProgress progress ) : void
folderPath string
progress IProgress
return void
        public static void CompressImages(string folderPath, IProgress progress)
        {
            var imageFiles = Directory.GetFiles(folderPath, "*.png");
            int completed = 0;
            foreach (string path in imageFiles)
            {

                if (Path.GetFileName(path).ToLowerInvariant() == "placeholder.png")
                    return;

                progress.ProgressIndicator.PercentCompleted = (int)(100.0 * (float)completed / (float)imageFiles.Length);
                CompressImage(path, progress);
                completed++;
            }
        }