Change image creation in capturezone to wrap

This commit is contained in:
Darth Affe 2024-07-21 22:53:45 +02:00
parent d74f3a6b21
commit 122327532b

View File

@ -77,14 +77,7 @@ public sealed class CaptureZone<TColor> : ICaptureZone
/// <summary>
/// Gets a <see cref="IImage{TColor}"/>.
/// </summary>
public IImage<TColor> Image
{
get
{
lock (_lock)
return Image<TColor>.Create(RawBuffer, Width, Height, Stride);
}
}
public IImage<TColor> Image => Image<TColor>.Wrap(InternalBuffer, Width, Height, Stride);
/// <inheritdoc />
IImage ICaptureZone.Image => Image;