@@ -140,7 +140,7 @@ public Image<TPixel> Decode<TPixel>(BufferedReadStream stream, CancellationToken
140
140
this . ReadApplicationExtension ( stream ) ;
141
141
break ;
142
142
case GifConstants . PlainTextLabel :
143
- this . SkipBlock ( stream ) ; // Not supported by any known decoder.
143
+ SkipBlock ( stream ) ; // Not supported by any known decoder.
144
144
break ;
145
145
}
146
146
}
@@ -189,7 +189,7 @@ public ImageInfo Identify(BufferedReadStream stream, CancellationToken cancellat
189
189
switch ( stream . ReadByte ( ) )
190
190
{
191
191
case GifConstants . GraphicControlLabel :
192
- this . SkipBlock ( stream ) ; // Skip graphic control extension block
192
+ SkipBlock ( stream ) ; // Skip graphic control extension block
193
193
break ;
194
194
case GifConstants . CommentLabel :
195
195
this . ReadComments ( stream ) ;
@@ -198,7 +198,7 @@ public ImageInfo Identify(BufferedReadStream stream, CancellationToken cancellat
198
198
this . ReadApplicationExtension ( stream ) ;
199
199
break ;
200
200
case GifConstants . PlainTextLabel :
201
- this . SkipBlock ( stream ) ; // Not supported by any known decoder.
201
+ SkipBlock ( stream ) ; // Not supported by any known decoder.
202
202
break ;
203
203
}
204
204
}
@@ -307,7 +307,7 @@ private void ReadApplicationExtension(BufferedReadStream stream)
307
307
{
308
308
// Reset the stream position and continue.
309
309
stream . Position = position ;
310
- this . SkipBlock ( stream , appLength ) ;
310
+ SkipBlock ( stream , appLength ) ;
311
311
}
312
312
313
313
return ;
@@ -327,20 +327,20 @@ private void ReadApplicationExtension(BufferedReadStream stream)
327
327
328
328
// Could be something else not supported yet.
329
329
// Skip the subblock and terminator.
330
- this . SkipBlock ( stream , subBlockSize ) ;
330
+ SkipBlock ( stream , subBlockSize ) ;
331
331
332
332
return ;
333
333
}
334
334
335
- this . SkipBlock ( stream , appLength ) ; // Not supported by any known decoder.
335
+ SkipBlock ( stream , appLength ) ; // Not supported by any known decoder.
336
336
}
337
337
338
338
/// <summary>
339
339
/// Skips over a block or reads its terminator.
340
340
/// <param name="blockSize">The length of the block to skip.</param>
341
341
/// <param name="stream">The <see cref="BufferedReadStream"/> containing image data.</param>
342
342
/// </summary>
343
- private void SkipBlock ( BufferedReadStream stream , int blockSize = 0 )
343
+ private static void SkipBlock ( BufferedReadStream stream , int blockSize = 0 )
344
344
{
345
345
if ( blockSize > 0 )
346
346
{
@@ -363,7 +363,7 @@ private void ReadComments(BufferedReadStream stream)
363
363
{
364
364
int length ;
365
365
366
- var stringBuilder = new StringBuilder ( ) ;
366
+ StringBuilder stringBuilder = new StringBuilder ( ) ;
367
367
while ( ( length = stream . ReadByte ( ) ) != 0 )
368
368
{
369
369
if ( length > GifConstants . MaxCommentSubBlockLength )
@@ -432,7 +432,7 @@ private void ReadFrame<TPixel>(BufferedReadStream stream, ref Image<TPixel>? ima
432
432
this . ReadFrameColors ( ref image , ref previousFrame , indices , colorTable , this . imageDescriptor ) ;
433
433
434
434
// Skip any remaining blocks
435
- this . SkipBlock ( stream ) ;
435
+ SkipBlock ( stream ) ;
436
436
}
437
437
finally
438
438
{
0 commit comments