|
|
@ -6,7 +6,7 @@ using System.IO; |
|
|
using System.Runtime.CompilerServices; |
|
|
using System.Runtime.CompilerServices; |
|
|
using System.Runtime.InteropServices; |
|
|
using System.Runtime.InteropServices; |
|
|
using System.Text; |
|
|
using System.Text; |
|
|
using SixLabors.ImageSharp.Advanced; |
|
|
|
|
|
using SixLabors.ImageSharp.Memory; |
|
|
using SixLabors.ImageSharp.Memory; |
|
|
using SixLabors.ImageSharp.Metadata; |
|
|
using SixLabors.ImageSharp.Metadata; |
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
@ -241,6 +241,10 @@ namespace SixLabors.ImageSharp.Formats.Gif |
|
|
this.stream.Read(this.buffer, 0, 9); |
|
|
this.stream.Read(this.buffer, 0, 9); |
|
|
|
|
|
|
|
|
this.imageDescriptor = GifImageDescriptor.Parse(this.buffer); |
|
|
this.imageDescriptor = GifImageDescriptor.Parse(this.buffer); |
|
|
|
|
|
if (this.imageDescriptor.Height == 0 || this.imageDescriptor.Width == 0) |
|
|
|
|
|
{ |
|
|
|
|
|
GifThrowHelper.ThrowInvalidImageContentException("Width or height should not be 0"); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
|