Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Conceição <Tiago_caza@hotmail.com>2021-05-19 23:42:07 +0300
committerTiago Conceição <Tiago_caza@hotmail.com>2021-05-19 23:42:07 +0300
commitc43badb9c15b22a27b1cae5e386f158c6c2f3b11 (patch)
tree915dfabcb509ab5a8397e67f97e7f10e9d006cc1 /UVtools.Core/FileFormats/FDGFile.cs
parent51c82318cf27b8e0d3425aa2ea1b093fc5b7d23f (diff)
v2.12.1v2.12.1
- (Upgrade) AvaloniaUI from 0.10.4 to 0.10.5 - (Improvement) VDT: Implement a new key for better auto convert files between with latest version of Tango - (Change) Exposure time finder: Bar fence offset from 2px to 4px
Diffstat (limited to 'UVtools.Core/FileFormats/FDGFile.cs')
-rw-r--r--UVtools.Core/FileFormats/FDGFile.cs14
1 files changed, 7 insertions, 7 deletions
diff --git a/UVtools.Core/FileFormats/FDGFile.cs b/UVtools.Core/FileFormats/FDGFile.cs
index 71fc401..57b5ff6 100644
--- a/UVtools.Core/FileFormats/FDGFile.cs
+++ b/UVtools.Core/FileFormats/FDGFile.cs
@@ -333,7 +333,7 @@ namespace UVtools.Core.FileFormats
public static unsafe byte[] Encode(Mat image)
{
- List<byte> rawData = new List<byte>();
+ List<byte> rawData = new();
var span = image.GetBytePointer();
var imageLength = image.GetLength();
@@ -464,7 +464,7 @@ namespace UVtools.Core.FileFormats
if (Parent.HeaderSettings.EncryptionKey > 0)
{
- KeyRing kr = new KeyRing(Parent.HeaderSettings.EncryptionKey, layerIndex);
+ KeyRing kr = new(Parent.HeaderSettings.EncryptionKey, layerIndex);
EncodedRle = kr.Read(EncodedRle);
}
@@ -524,7 +524,7 @@ namespace UVtools.Core.FileFormats
public void Encode(Mat image, uint layerIndex)
{
- List<byte> rawData = new List<byte>();
+ List<byte> rawData = new();
//byte color = byte.MaxValue >> 1;
byte color = byte.MaxValue;
@@ -589,7 +589,7 @@ namespace UVtools.Core.FileFormats
if (Parent.HeaderSettings.EncryptionKey > 0)
{
- KeyRing kr = new KeyRing(Parent.HeaderSettings.EncryptionKey, layerIndex);
+ KeyRing kr = new(Parent.HeaderSettings.EncryptionKey, layerIndex);
EncodedRle = kr.Read(rawData).ToArray();
}
else
@@ -637,7 +637,7 @@ namespace UVtools.Core.FileFormats
public List<byte> Read(List<byte> input)
{
- List<byte> data = new List<byte>(input.Count);
+ List<byte> data = new(input.Count);
data.AddRange(input.Select(t => (byte)(t ^ Next())));
return data;
@@ -963,7 +963,7 @@ namespace UVtools.Core.FileFormats
HeaderSettings.PreviewLargeOffsetAddress = currentOffset;
}
- Preview preview = new Preview
+ Preview preview = new()
{
ResolutionX = (uint) image.Width,
ResolutionY = (uint) image.Height,
@@ -990,7 +990,7 @@ namespace UVtools.Core.FileFormats
Parallel.For(0, LayerCount, /*new ParallelOptions{MaxDegreeOfParallelism = 1},*/ layerIndex =>
{
if(progress.Token.IsCancellationRequested) return;
- LayerData layer = new LayerData(this, (uint) layerIndex);
+ LayerData layer = new(this, (uint) layerIndex);
using (var image = this[layerIndex].LayerMat)
{
layer.Encode(image, (uint) layerIndex);