mirror of
https://github.com/DarthAffe/StableDiffusion.NET.git
synced 2025-12-12 21:38:45 +00:00
Removed .net 6 only code
This commit is contained in:
parent
a1576994a7
commit
d91132fbea
@ -14,7 +14,7 @@ public sealed class Image<TColor> : IImage
|
|||||||
#region Properties & Fields
|
#region Properties & Fields
|
||||||
|
|
||||||
private readonly byte[] _buffer;
|
private readonly byte[] _buffer;
|
||||||
|
|
||||||
private readonly int _x;
|
private readonly int _x;
|
||||||
private readonly int _y;
|
private readonly int _y;
|
||||||
private readonly int _stride;
|
private readonly int _stride;
|
||||||
@ -216,13 +216,8 @@ public sealed class Image<TColor> : IImage
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int Length => _length;
|
public int Length => _length;
|
||||||
|
|
||||||
#if NET7_0_OR_GREATER
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int SizeInBytes => Length * TColor.ColorFormat.BytesPerPixel;
|
public int SizeInBytes => Length * TColor.ColorFormat.BytesPerPixel;
|
||||||
#else
|
|
||||||
/// <inheritdoc />
|
|
||||||
public int SizeInBytes => Length * default(TColor).Net6ColorFormat.BytesPerPixel;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@ -359,13 +354,8 @@ public sealed class Image<TColor> : IImage
|
|||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int Length => _length;
|
public int Length => _length;
|
||||||
|
|
||||||
#if NET7_0_OR_GREATER
|
|
||||||
/// <inheritdoc />
|
/// <inheritdoc />
|
||||||
public int SizeInBytes => Length * TColor.ColorFormat.BytesPerPixel;
|
public int SizeInBytes => Length * TColor.ColorFormat.BytesPerPixel;
|
||||||
#else
|
|
||||||
/// <inheritdoc />
|
|
||||||
public int SizeInBytes => Length * default(TColor).Net6ColorFormat.BytesPerPixel;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user