Skip to content

Commit 8cf0e58

Browse files
Use correct encoder
1 parent dff139d commit 8cf0e58

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

tests/SixLabors.Fonts.Tests/ImageComparison/TestImageExtensions.cs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,17 @@ public static string DebugSave(
3131
Directory.CreateDirectory(outputDirectory);
3232
}
3333

34-
string path = Path.Combine(outputDirectory, $"{test}{FormatTestDetails(properties)}.{extension ?? "png"}");
35-
image.Save(path, Encoder);
34+
string ext = extension ?? "png";
35+
string path = Path.Combine(outputDirectory, $"{test}{FormatTestDetails(properties)}.{ext}");
36+
37+
if (ext == "png")
38+
{
39+
image.Save(path, Encoder);
40+
}
41+
else
42+
{
43+
image.Save(path);
44+
}
3645

3746
return path;
3847
}

0 commit comments

Comments
 (0)