diff options
Diffstat (limited to 'UVtools.Core/FileFormats/PHZFile.cs')
-rw-r--r-- | UVtools.Core/FileFormats/PHZFile.cs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/UVtools.Core/FileFormats/PHZFile.cs b/UVtools.Core/FileFormats/PHZFile.cs index 4f9a6a3..76b45ea 100644 --- a/UVtools.Core/FileFormats/PHZFile.cs +++ b/UVtools.Core/FileFormats/PHZFile.cs @@ -1017,11 +1017,8 @@ namespace UVtools.Core.FileFormats LayersDefinitions = null; } - public override void Encode(string fileFullPath, OperationProgress progress = null) + protected override void EncodeInternally(string fileFullPath, OperationProgress progress) { - progress ??= new OperationProgress(); - progress.Reset(OperationProgress.StatusEncodeLayers, LayerCount); - base.Encode(fileFullPath, progress); LayersHash.Clear(); /*if (HeaderSettings.EncryptionKey == 0) @@ -1139,8 +1136,6 @@ namespace UVtools.Core.FileFormats outputFile.Seek(0, SeekOrigin.Begin); Helpers.SerializeWriteFileStream(outputFile, HeaderSettings); - AfterEncode(); - Debug.WriteLine("Encode Results:"); Debug.WriteLine(HeaderSettings); Debug.WriteLine(Previews[0]); @@ -1149,11 +1144,8 @@ namespace UVtools.Core.FileFormats } } - public override void Decode(string fileFullPath, OperationProgress progress = null) + protected override void DecodeInternally(string fileFullPath, OperationProgress progress) { - base.Decode(fileFullPath, progress); - if(progress is null) progress = new OperationProgress(OperationProgress.StatusGatherLayers, LayerCount); - using (var inputFile = new FileStream(fileFullPath, FileMode.Open, FileAccess.Read)) { @@ -1167,9 +1159,6 @@ namespace UVtools.Core.FileFormats HeaderSettings.AntiAliasLevel = 1; - FileFullPath = fileFullPath; - - progress.Reset(OperationProgress.StatusDecodeThumbnails, ThumbnailsCount); Debug.Write("Header -> "); Debug.WriteLine(HeaderSettings); @@ -1256,8 +1245,6 @@ namespace UVtools.Core.FileFormats } }); } - - progress.Token.ThrowIfCancellationRequested(); } public override void SaveAs(string filePath = null, OperationProgress progress = null) |