@@ -40,7 +40,7 @@ public sealed class Image<TColor> : IImage
4040 [ MethodImpl ( MethodImplOptions . AggressiveInlining ) ]
4141 get
4242 {
43- if ( ( x < 0 ) || ( y < 0 ) || ( width <= 0 ) || ( height <= 0 ) || ( ( x + width ) >= Width ) || ( ( y + height ) >= Height ) ) throw new IndexOutOfRangeException ( ) ;
43+ if ( ( x < 0 ) || ( y < 0 ) || ( width <= 0 ) || ( height <= 0 ) || ( ( x + width ) > Width ) || ( ( y + height ) > Height ) ) throw new IndexOutOfRangeException ( ) ;
4444
4545 return new Image < TColor > ( _buffer , _x + x , _y + y , width , height , _stride ) ;
4646 }
@@ -100,6 +100,8 @@ private sealed class ImageRows : IImage.IImageRows
100100 private readonly int _height ;
101101 private readonly int _stride ;
102102
103+ public int Count => _height ;
104+
103105 #endregion
104106
105107 #region Indexer
@@ -151,6 +153,8 @@ private sealed class ImageRow : IImage.IImageRow
151153 private readonly int _start ;
152154 private readonly int _length ;
153155
156+ public int Length => _length ;
157+
154158 #endregion
155159
156160 #region Indexer
@@ -203,6 +207,8 @@ private sealed class ImageColumns : IImage.IImageColumns
203207 private readonly int _height ;
204208 private readonly int _stride ;
205209
210+ public int Count => _width ;
211+
206212 #endregion
207213
208214 #region Indexer
@@ -255,6 +261,8 @@ private sealed class ImageColumn : IImage.IImageColumn
255261 private readonly int _length ;
256262 private readonly int _step ;
257263
264+ public int Length => _length ;
265+
258266 #endregion
259267
260268 #region Indexer
0 commit comments