Exemplo n.º 1
0
        protected override void OnSaveT(Document input, Stream output, PropertyBasedSaveConfigToken token, Surface scratchSurface, ProgressEventHandler progressCallback)
        {
            DdsFileFormat      fileFormat      = (DdsFileFormat)token.GetProperty(PropertyNames.FileFormat).Value;
            BC7CompressionMode compressionMode = (BC7CompressionMode)token.GetProperty(PropertyNames.BC7CompressionMode).Value;
            DdsErrorMetric     errorMetric     = (DdsErrorMetric)token.GetProperty(PropertyNames.ErrorMetric).Value;
            bool           generateMipmaps     = token.GetProperty <BooleanProperty>(PropertyNames.GenerateMipMaps).Value;
            MipMapSampling mipSampling         = (MipMapSampling)token.GetProperty(PropertyNames.MipMapResamplingAlgorithm).Value;

            DdsFile.Save(input, output, fileFormat, errorMetric, compressionMode, generateMipmaps, mipSampling, scratchSurface, progressCallback);
        }
Exemplo n.º 2
0
 protected override Document OnLoad(Stream input)
 {
     return(DdsFile.Load(input));
 }