public void ExportCubemapAsFaces(string fileSavePath, CubemapImages images)
        {
            var filenames = GetCubeFileNames(fileSavePath);

            ImageSaveService.Save(filenames[0], images.Back);
            ImageSaveService.Save(filenames[1], images.Bottom);
            ImageSaveService.Save(filenames[2], images.Front);
            ImageSaveService.Save(filenames[3], images.Left);
            ImageSaveService.Save(filenames[4], images.Right);
            ImageSaveService.Save(filenames[5], images.Top);
        }
        public void ExportCubemap(string fileSavePath, Node node, bool saveSeparately = false, bool exportAsSphericalProjection = false)
        {
            CubeMapImageSet imageSet;

            if (node.DepthMap != null)
            {
                imageSet = node.DepthMap;
            }
            else
            {
                imageSet = node.CubeMap;
            }

            CubemapImages images = GetCubemapImagesForImageSet(node, imageSet);

            if (!saveSeparately)
            {
                Bitmap finalImage;
                if (exportAsSphericalProjection)
                {
                    MessageBox.Show("Exporting as spherical projection may take up to around a minute to finish.");
                    finalImage = new SphericalProjectionService().ConstructProjection(images);
                }
                else
                {
                    finalImage = new CubeMapBuilder().ConstructCubemap(images);
                }

                ImageSaveService.Save(fileSavePath, finalImage);

                if (exportAsSphericalProjection)
                {
                    MessageBox.Show("Exporting as spherical projection has completed!");
                }
            }
            else
            {
                // with Revelation images need assembly, which create bitmaps in memory
                // the best output for images manipulated by the program as png files
                // that way they retain detail, without creating output files that are gigantic
                // saving as jpg would be too lossy

                // With Exile the original jpg image data can be saved directly from the original files
                // this avoids un-needed conversion and loss of detail or increase the output file size
                if (SelectedGame == "Exile")
                {
                    ExportCubemapDataDirectly(fileSavePath, node);
                }
                else
                {
                    ExportCubemapAsFaces(fileSavePath, images);
                }
            }
        }
        private void ExportCubemapDataDirectly(string fileSavePath, Node node)
        {
            var filenames = GetCubeFileNames(fileSavePath);
            var imageSet  = node.CubeMap;

            ImageSaveService.Save(
                filenames[0],
                this.LookupFileImageData(node, imageSet.Back.File));
            ImageSaveService.Save(
                filenames[1],
                this.LookupFileImageData(node, imageSet.Bottom.File));
            ImageSaveService.Save(
                filenames[2],
                this.LookupFileImageData(node, imageSet.Front.File));
            ImageSaveService.Save(
                filenames[3],
                this.LookupFileImageData(node, imageSet.Left.File));
            ImageSaveService.Save(
                filenames[4],
                this.LookupFileImageData(node, imageSet.Right.File));
            ImageSaveService.Save(
                filenames[5],
                this.LookupFileImageData(node, imageSet.Top.File));
        }