We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 42f015e + 8464a3d commit adf56a4Copy full SHA for adf56a4
src/ImageSharp/Image{TPixel}.cs
@@ -201,14 +201,14 @@ public Span<TPixel> GetPixelRowSpan(int rowIndex)
201
public bool TryGetSinglePixelSpan(out Span<TPixel> span)
202
{
203
IMemoryGroup<TPixel> mg = this.GetPixelMemoryGroup();
204
- if (mg.Count > 1)
+ if (mg.Count == 1)
205
206
- span = default;
207
- return false;
+ span = mg[0].Span;
+ return true;
208
}
209
210
- span = mg.Single().Span;
211
- return true;
+ span = default;
+ return false;
212
213
214
/// <summary>
0 commit comments