File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed
src/ImageSharp/Formats/Webp Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -277,7 +277,9 @@ private WebpImageInfo ReadVp8XHeader()
277277 }
278278 else
279279 {
280- WebpThrowHelper . ThrowImageFormatException ( "Unexpected chunk followed VP8X header" ) ;
280+ // Ignore unknown chunks.
281+ uint chunkSize = this . ReadChunkSize ( ) ;
282+ this . currentStream . Skip ( ( int ) chunkSize ) ;
281283 }
282284 }
283285
Original file line number Diff line number Diff line change @@ -358,6 +358,17 @@ public void WebpDecoder_CanDecode_Issue1594<TPixel>(TestImageProvider<TPixel> pr
358358 }
359359 }
360360
361+ // https://github.com/SixLabors/ImageSharp/issues/2243
362+ [ Theory ]
363+ [ WithFile ( Lossy . Issue2243 , PixelTypes . Rgba32 ) ]
364+ public void WebpDecoder_CanDecode_Issue2243 < TPixel > ( TestImageProvider < TPixel > provider )
365+ where TPixel : unmanaged, IPixel < TPixel >
366+ {
367+ using Image < TPixel > image = provider . GetImage ( WebpDecoder ) ;
368+ image . DebugSave ( provider ) ;
369+ image . CompareToOriginal ( provider , ReferenceDecoder ) ;
370+ }
371+
361372 [ Theory ]
362373 [ WithFile ( Lossless . LossLessCorruptImage3 , PixelTypes . Rgba32 ) ]
363374 public void WebpDecoder_ThrowImageFormatException_OnInvalidImages < TPixel > ( TestImageProvider < TPixel > provider )
Original file line number Diff line number Diff line change @@ -741,6 +741,7 @@ public static class Lossy
741741
742742 // Issues
743743 public const string Issue1594 = "Webp/issues/Issue1594.webp" ;
744+ public const string Issue2243 = "Webp/issues/Issue2243.webp" ;
744745 }
745746 }
746747
You can’t perform that action at this time.
0 commit comments