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> /// <summary>
/// Gets a <see cref="IImage{TColor}"/>. /// Gets a <see cref="IImage{TColor}"/>.
/// </summary> /// </summary>
public IImage<TColor> Image public IImage<TColor> Image => Image<TColor>.Wrap(InternalBuffer, Width, Height, Stride);
{
get
{
lock (_lock)
return Image<TColor>.Create(RawBuffer, Width, Height, Stride);
}
}
/// <inheritdoc /> /// <inheritdoc />
IImage ICaptureZone.Image => Image; IImage ICaptureZone.Image => Image;