PurplePen.OcadCreation.CreateBitmapFileName C# (CSharp) Method

CreateBitmapFileName() private method

private CreateBitmapFileName ( ImageFormat &imageFormat ) : string
imageFormat System.Drawing.Imaging.ImageFormat
return string
        string CreateBitmapFileName(out ImageFormat imageFormat)
        {
            string extension;

            Debug.Assert(controller.MapDisplay.MapType == MapType.PDF || controller.MapDisplay.MapType == MapType.Bitmap);

            if (creationSettings.fileFormat.kind == MapFileFormatKind.OCAD && creationSettings.fileFormat.version <= 7) {
                extension = ".bmp";
                imageFormat = ImageFormat.Bmp;
            }
            else if (creationSettings.fileFormat.kind == MapFileFormatKind.OCAD && creationSettings.fileFormat.version <= 10) {
                extension = ".gif";
                imageFormat = ImageFormat.Gif;
            }
            else {
                extension = ".png";
                imageFormat = ImageFormat.Png;
            }

            string basePdfName = Path.GetFileName(controller.MapFileName);
            return Path.GetFullPath(Path.Combine(creationSettings.outputDirectory, Path.ChangeExtension(basePdfName, extension)));
        }