Skip to content

Commit 8908dba

Browse files
Minor AOT fixes and .NET 7 fixes.
1 parent a794ac1 commit 8908dba

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/ImageSharp/Formats/Webp/Lossless/Vp8LEncoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -502,7 +502,7 @@ private CrunchConfig[] EncoderAnalyze(ReadOnlySpan<uint> bgra, int width, int he
502502
doNotCache = true;
503503

504504
// Go brute force on all transforms.
505-
foreach (EntropyIx entropyIx in Enum.GetValues(typeof(EntropyIx)).Cast<EntropyIx>())
505+
foreach (EntropyIx entropyIx in Enum.GetValues<EntropyIx>())
506506
{
507507
// We can only apply kPalette or kPaletteAndSpatial if we can indeed use a palette.
508508
if ((entropyIx != EntropyIx.Palette && entropyIx != EntropyIx.PaletteAndSpatial) || usePalette)

src/ImageSharp/Metadata/Profiles/ICC/IccReader.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,9 @@ private static IccTagDataEntry[] ReadTagData(IccDataReader reader)
8888
foreach (IccTagTableEntry tag in tagTable)
8989
{
9090
IccTagDataEntry entry;
91-
if (store.ContainsKey(tag.Offset))
91+
if (store.TryGetValue(tag.Offset, out IccTagDataEntry? value))
9292
{
93-
entry = store[tag.Offset];
93+
entry = value;
9494
}
9595
else
9696
{

0 commit comments

Comments
 (0)