mirror of https://github.com/SixLabors/ImageSharp
committed by
Dirk Lemstra
4 changed files with 55 additions and 4 deletions
@ -0,0 +1,44 @@ |
|||||
|
// <copyright file="JpegDecoderCoreTests.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 JpegDecoderCoreTests |
||||
|
{ |
||||
|
[Fact] |
||||
|
public void Decode_IgnoreMetadataIsFalse_ExifProfileIsRead() |
||||
|
{ |
||||
|
var options = new DecoderOptions() |
||||
|
{ |
||||
|
IgnoreMetadata = false |
||||
|
}; |
||||
|
|
||||
|
TestFile testFile = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan); |
||||
|
|
||||
|
using (Image image = new Image(testFile.FilePath, options)) |
||||
|
{ |
||||
|
Assert.NotNull(image.MetaData.ExifProfile); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
[Fact] |
||||
|
public void Decode_IgnoreMetadataIsTrue_ExifProfileIgnored() |
||||
|
{ |
||||
|
var options = new DecoderOptions() |
||||
|
{ |
||||
|
IgnoreMetadata = true |
||||
|
}; |
||||
|
|
||||
|
TestFile testFile = TestFile.Create(TestImages.Jpeg.Baseline.Floorplan); |
||||
|
|
||||
|
using (Image image = new Image(testFile.FilePath, options)) |
||||
|
{ |
||||
|
Assert.Null(image.MetaData.ExifProfile); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue