mirror of https://github.com/SixLabors/ImageSharp
committed by
Dirk Lemstra
6 changed files with 95 additions and 13 deletions
@ -0,0 +1,46 @@ |
|||
// <copyright file="GifDecoderCoreTests.cs" company="James Jackson-South">
|
|||
// Copyright (c) James Jackson-South and contributors.
|
|||
// Licensed under the Apache License, Version 2.0.
|
|||
// </copyright>
|
|||
|
|||
namespace ImageSharp.Tests |
|||
{ |
|||
using Xunit; |
|||
|
|||
public class GifDecoderCoreTests |
|||
{ |
|||
[Fact] |
|||
public void Decode_IgnoreMetadataIsFalse_CommentsAreRead() |
|||
{ |
|||
var options = new DecoderOptions() |
|||
{ |
|||
IgnoreMetadata = false |
|||
}; |
|||
|
|||
TestFile testFile = TestFile.Create(TestImages.Gif.Rings); |
|||
|
|||
using (Image image = new Image(testFile.FilePath, options)) |
|||
{ |
|||
Assert.Equal(1, image.MetaData.Properties.Count); |
|||
Assert.Equal("Comments", image.MetaData.Properties[0].Name); |
|||
Assert.Equal("ImageSharp", image.MetaData.Properties[0].Value); |
|||
} |
|||
} |
|||
|
|||
[Fact] |
|||
public void Decode_IgnoreMetadataIsTrue_CommentsAreIgnored() |
|||
{ |
|||
var options = new DecoderOptions() |
|||
{ |
|||
IgnoreMetadata = true |
|||
}; |
|||
|
|||
TestFile testFile = TestFile.Create(TestImages.Gif.Rings); |
|||
|
|||
using (Image image = new Image(testFile.FilePath, options)) |
|||
{ |
|||
Assert.Equal(0, image.MetaData.Properties.Count); |
|||
} |
|||
} |
|||
} |
|||
} |
|||
@ -1,3 +1,3 @@ |
|||
version https://git-lfs.github.com/spec/v1 |
|||
oid sha256:716448da88152225767c024aac498f5b7562b6e8391907cefc9d03dba40050fd |
|||
size 53435 |
|||
oid sha256:a7b9b5f5056a8d90134d72b462bf37675ab37aa2551ffeae0072037a0a27ad74 |
|||
size 53457 |
|||
|
|||
Loading…
Reference in new issue