@@ -60,7 +60,7 @@ private static Configuration GetConfiguration(IConfigurationProvider source)
6060 /// therefore it's not recommended to mutate the image while holding a reference to it's <see cref="IMemoryGroup{T}"/>.
6161 /// </remarks>
6262 public static IMemoryGroup < TPixel > GetPixelMemoryGroup < TPixel > ( this ImageFrame < TPixel > source )
63- where TPixel : struct , IPixel < TPixel >
63+ where TPixel : unmanaged , IPixel < TPixel >
6464 => source ? . PixelBuffer . FastMemoryGroup . View ?? throw new ArgumentNullException ( nameof ( source ) ) ;
6565
6666 /// <summary>
@@ -75,7 +75,7 @@ public static IMemoryGroup<TPixel> GetPixelMemoryGroup<TPixel>(this ImageFrame<T
7575 /// therefore it's not recommended to mutate the image while holding a reference to it's <see cref="IMemoryGroup{T}"/>.
7676 /// </remarks>
7777 public static IMemoryGroup < TPixel > GetPixelMemoryGroup < TPixel > ( this Image < TPixel > source )
78- where TPixel : struct , IPixel < TPixel >
78+ where TPixel : unmanaged , IPixel < TPixel >
7979 => source ? . Frames . RootFrame . GetPixelMemoryGroup ( ) ?? throw new ArgumentNullException ( nameof ( source ) ) ;
8080
8181 /// <summary>
@@ -89,7 +89,7 @@ public static IMemoryGroup<TPixel> GetPixelMemoryGroup<TPixel>(this Image<TPixel
8989 [ Obsolete (
9090 @"GetPixelSpan might fail, because the backing buffer could be discontiguous for large images. Use GetPixelMemoryGroup or GetPixelRowSpan instead!" ) ]
9191 public static Span < TPixel > GetPixelSpan < TPixel > ( this ImageFrame < TPixel > source )
92- where TPixel : struct , IPixel < TPixel >
92+ where TPixel : unmanaged , IPixel < TPixel >
9393 {
9494 Guard . NotNull ( source , nameof ( source ) ) ;
9595
@@ -113,7 +113,7 @@ public static Span<TPixel> GetPixelSpan<TPixel>(this ImageFrame<TPixel> source)
113113 [ Obsolete (
114114 @"GetPixelSpan might fail, because the backing buffer could be discontiguous for large images. Use GetPixelMemoryGroup or GetPixelRowSpan instead!" ) ]
115115 public static Span < TPixel > GetPixelSpan < TPixel > ( this Image < TPixel > source )
116- where TPixel : struct , IPixel < TPixel >
116+ where TPixel : unmanaged , IPixel < TPixel >
117117 {
118118 Guard . NotNull ( source , nameof ( source ) ) ;
119119
@@ -129,7 +129,7 @@ public static Span<TPixel> GetPixelSpan<TPixel>(this Image<TPixel> source)
129129 /// <param name="rowIndex">The row.</param>
130130 /// <returns>The <see cref="Span{TPixel}"/></returns>
131131 public static Span < TPixel > GetPixelRowSpan < TPixel > ( this ImageFrame < TPixel > source , int rowIndex )
132- where TPixel : struct , IPixel < TPixel >
132+ where TPixel : unmanaged , IPixel < TPixel >
133133 {
134134 Guard . NotNull ( source , nameof ( source ) ) ;
135135 Guard . MustBeGreaterThanOrEqualTo ( rowIndex , 0 , nameof ( rowIndex ) ) ;
@@ -147,7 +147,7 @@ public static Span<TPixel> GetPixelRowSpan<TPixel>(this ImageFrame<TPixel> sourc
147147 /// <param name="rowIndex">The row.</param>
148148 /// <returns>The <see cref="Span{TPixel}"/></returns>
149149 public static Span < TPixel > GetPixelRowSpan < TPixel > ( this Image < TPixel > source , int rowIndex )
150- where TPixel : struct , IPixel < TPixel >
150+ where TPixel : unmanaged , IPixel < TPixel >
151151 {
152152 Guard . NotNull ( source , nameof ( source ) ) ;
153153 Guard . MustBeGreaterThanOrEqualTo ( rowIndex , 0 , nameof ( rowIndex ) ) ;
@@ -165,7 +165,7 @@ public static Span<TPixel> GetPixelRowSpan<TPixel>(this Image<TPixel> source, in
165165 /// <param name="rowIndex">The row.</param>
166166 /// <returns>The <see cref="Span{TPixel}"/></returns>
167167 public static Memory < TPixel > GetPixelRowMemory < TPixel > ( this ImageFrame < TPixel > source , int rowIndex )
168- where TPixel : struct , IPixel < TPixel >
168+ where TPixel : unmanaged , IPixel < TPixel >
169169 {
170170 Guard . NotNull ( source , nameof ( source ) ) ;
171171 Guard . MustBeGreaterThanOrEqualTo ( rowIndex , 0 , nameof ( rowIndex ) ) ;
@@ -183,7 +183,7 @@ public static Memory<TPixel> GetPixelRowMemory<TPixel>(this ImageFrame<TPixel> s
183183 /// <param name="rowIndex">The row.</param>
184184 /// <returns>The <see cref="Span{TPixel}"/></returns>
185185 public static Memory < TPixel > GetPixelRowMemory < TPixel > ( this Image < TPixel > source , int rowIndex )
186- where TPixel : struct , IPixel < TPixel >
186+ where TPixel : unmanaged , IPixel < TPixel >
187187 {
188188 Guard . NotNull ( source , nameof ( source ) ) ;
189189 Guard . MustBeGreaterThanOrEqualTo ( rowIndex , 0 , nameof ( rowIndex ) ) ;
0 commit comments