Beispiel #1
0
        void ExportSs(string file, string filenameLower)
        {
            MadsPackReader r  = new MadsPackReader(file);
            var            ss = new MadsPackImageSS(r.getItems(), 0)
            {
                pathtoCol = _folderColo
            };
            var numImages = ss.getPictureCount();

            for (int i = 0; i < numImages; i++)
            {
                var filename = $"{filenameLower}_{i}";
                try
                {
                    using (Bitmap bmp = ss.GetImage(i))
                    {
                        bmp.Save(Path.Combine(_folderTarget, $"{filename}.png"), System.Drawing.Imaging.ImageFormat.Png);
                    }
                }
                catch (Exception e)
                {
                    _errorFiles.Add(filename);
                    Console.WriteLine($"Error for '{filename}': {e}");
                }
            }
        }
Beispiel #2
0
        void ExportPik(string file, string filenameLower)
        {
            MadsPackReader r   = new MadsPackReader(file);
            var            pik = new MadsPackImagePIK(r.getItems())
            {
                pathtoCol = _folderColo
            };

            using (Bitmap bmp = pik.GetImage())
            {
                bmp.Save(Path.Combine(_folderTarget, filenameLower + ".png"), System.Drawing.Imaging.ImageFormat.Png);
            }
        }