Skip to content

Commit cd5c5c8

Browse files
author
LoneWandererProductions
committed
sync back.
1 parent 5e9826d commit cd5c5c8

41 files changed

Lines changed: 146 additions & 143 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Imaging/Cif.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -439,4 +439,4 @@ private static Dictionary<Color, SortedSet<int>> SortDct(Dictionary<Color, Sorte
439439
return value.OrderByDescending(kv => kv.Value.Count)
440440
.ToDictionary(kv => kv.Key, kv => kv.Value);
441441
}
442-
}
442+
}

Imaging/CifImageData.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,4 +95,4 @@ private static (int? Start, int? End)? GetStartEndPoint(IReadOnlyList<string> ls
9595

9696
return checkStart && checkEnd ? (start, end) : null;
9797
}
98-
}
98+
}

Imaging/CifMetadata.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,4 +62,4 @@ public sealed class CifMetadata
6262
/// The check sum.
6363
/// </value>
6464
public int CheckSum { get; set; }
65-
}
65+
}

Imaging/CifProcessing.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ namespace Imaging;
2323
internal static class CifProcessing
2424
{
2525
/// <summary>
26-
/// Converts to cif.
26+
/// Converts to cif.
2727
/// </summary>
2828
/// <param name="image">The image.</param>
29+
/// <returns>Get Cif from Bitmap</returns>
2930
internal static Dictionary<Color, SortedSet<int>> ConvertToCifFromBitmap(Bitmap image)
3031
{
3132
var imageFormat = new Dictionary<Color, SortedSet<int>>();
@@ -231,4 +232,4 @@ internal static List<List<string>> GenerateCsvCompressed(int imageHeight, int im
231232

232233
return master;
233234
}
234-
}
235+
}

Imaging/ColorHsv.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,4 +419,4 @@ private static void ValidateHsv(double h, double s, double v, int a)
419419
if (a < 0 || a > 255) throw new ArgumentOutOfRangeException("Alpha must be 0–255");
420420
}
421421
}
422-
}
422+
}

Imaging/CustomImageFormat.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ public Cif GenerateCifFromBitmap(Bitmap image)
7575
/// <param name="path">The path.</param>
7676
public void GenerateBitmapToCifFile(Bitmap image, string path)
7777
{
78-
var imageFormat = CifProcessing.ConvertToCifFromBitmap(image);
79-
var lst = CifProcessing.GenerateCsv(image.Height, image.Width, imageFormat);
78+
var cif = GenerateCifFromBitmap(image); // reuse conversion
79+
var lst = CifProcessing.GenerateCsv(cif.Height, cif.Width, cif.CifImage);
8080
CsvHandler.WriteCsv(path, lst);
8181
}
8282

@@ -93,4 +93,4 @@ public void GenerateCifCompressedFromBitmap(Bitmap image, string path)
9393
var lst = CifProcessing.GenerateCsvCompressed(image.Height, image.Width, imageFormat);
9494
CsvHandler.WriteCsv(path, lst);
9595
}
96-
}
96+
}

Imaging/DirectBitmap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,4 +698,4 @@ private void Dispose(bool disposing)
698698
// Finalizer calls Dispose(false)
699699
Dispose(false);
700700
}
701-
}
701+
}

Imaging/DirectBitmapImage.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,6 @@ public unsafe void SetPixelsSimd(IEnumerable<(int x, int y, Color color)> pixels
318318
foreach (var (x, y, c) in pixels)
319319
{
320320
if ((uint)x >= Width || (uint)y >= Height) continue;
321-
322321
var packed = (uint)(c.A << 24 | c.R << 16 | c.G << 8 | c.B);
323322
var index = x + y * Width;
324323
ptr[index] = packed;
@@ -404,4 +403,4 @@ private void Dispose(bool disposing)
404403
{
405404
Dispose(false);
406405
}
407-
}
406+
}

Imaging/Enums/FiltersType.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,4 +155,4 @@ public enum FiltersType
155155
/// The pencil sketch effect
156156
/// </summary>
157157
PencilSketchEffect = 26
158-
}
158+
}

Imaging/Enums/MaskShape.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ public enum MaskShape
2929
/// The polygon
3030
/// </summary>
3131
Polygon = 2
32-
}
32+
}

0 commit comments

Comments
 (0)