示例#1
0
        private void Render()
        {
            var src = dds.ToBitmapSource(GetOptions(), bitmap.CubeLayout);

            if (src.CanFreeze)
            {
                src.Freeze();
            }
            ImageSource = src;
        }
示例#2
0
        public static void WriteToTarga(this DdsImage dds, string fileName, DecompressOptions options, CubemapLayout layout)
        {
            var source = dds.ToBitmapSource(options, layout);
            var format = options.HasFlag(DecompressOptions.Bgr24) ? Imaging.PixelFormat.Format24bppRgb : Imaging.PixelFormat.Format32bppArgb;

            WriteToTarga(source, fileName, format);
        }
示例#3
0
        public static void WriteToTarga(this DdsImage dds, string fileName, DdsOutputArgs args)
        {
            var source = dds.ToBitmapSource(args);
            var format = args.Options.HasFlag(DecompressOptions.Bgr24) ? Imaging.PixelFormat.Format24bppRgb : Imaging.PixelFormat.Format32bppArgb;

            WriteToTarga(source, fileName, format);
        }