Aspose.Imaging.Examples.CSharp.ModifyingAndConvertingImages.SavingEachFrameInOtherRasterImageFormat.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:SavingEachFrameInOtherRasterImageFormat
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_ModifyingAndConvertingImages();

            // Create an instance of TiffImage and load the file from disc
            using (var multiImage = (TiffImage)Image.Load(dataDir + "SampleTiff1.tiff"))
            {
                // Initialize a variable to keep track of the frames in the image
                int i = 0;

                // Iterate over the tiff frame collection and Save the frame directly on disc in PNG format
                foreach (var tiffFrame in multiImage.Frames)
                {
                    tiffFrame.Save(dataDir + i + "_out.png", new PngOptions());
                }
            }
            // ExEnd:SavingEachFrameInOtherRasterImageFormat
        }
    }
SavingEachFrameInOtherRasterImageFormat