Skip to content

Commit 80dc3f5

Browse files
Don't over allocate
1 parent cb71ae2 commit 80dc3f5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/ImageSharp/ColorProfiles/ColorProfileConverterExtensionsCieLabCieXyz.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ public static void Convert<TFrom, TTo>(this ColorProfileConverter converter, Rea
3939
TFrom.ToProfileConnectionSpace(options, source, pcsFrom);
4040

4141
// Convert between PCS.
42-
using IMemoryOwner<CieXyz> pcsToOwner = options.MemoryAllocator.Allocate<CieXyz>(source.Length * 2);
43-
Span<CieXyz> pcsTo = pcsToOwner.GetSpan()[..source.Length];
42+
using IMemoryOwner<CieXyz> pcsToOwner = options.MemoryAllocator.Allocate<CieXyz>(source.Length);
43+
Span<CieXyz> pcsTo = pcsToOwner.GetSpan();
4444
CieLab.ToProfileConnectionSpace(options, pcsFrom, pcsTo);
4545

4646
// Adapt to target white point

src/ImageSharp/ColorProfiles/IColorProfile.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) Six Labors.
1+
// Copyright (c) Six Labors.
22
// Licensed under the Six Labors Split License.
33

44
namespace SixLabors.ImageSharp.ColorProfiles;
@@ -11,7 +11,7 @@ public interface IColorProfile
1111
/// <summary>
1212
/// Gets the chromatic adaption white point source.
1313
/// </summary>
14-
/// <returns>The <see cref="GetChromaticAdaptionWhitePointSource"/>.</returns>
14+
/// <returns>The <see cref="ChromaticAdaptionWhitePointSource"/>.</returns>
1515
public static abstract ChromaticAdaptionWhitePointSource GetChromaticAdaptionWhitePointSource();
1616
}
1717

0 commit comments

Comments
 (0)