private void Render() { var src = dds.ToBitmapSource(GetOptions(), bitmap.CubeLayout); if (src.CanFreeze) { src.Freeze(); } ImageSource = src; }
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); }
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); }