mirror of https://github.com/SixLabors/ImageSharp
committed by
GitHub
5 changed files with 47 additions and 1 deletions
@ -0,0 +1,33 @@ |
|||||
|
// Copyright (c) Six Labors.
|
||||
|
// Licensed under the Apache License, Version 2.0.
|
||||
|
|
||||
|
using System; |
||||
|
using System.IO; |
||||
|
using SixLabors.ImageSharp.Formats.Jpeg; |
||||
|
using SixLabors.ImageSharp.PixelFormats; |
||||
|
|
||||
|
using Xunit; |
||||
|
|
||||
|
namespace SixLabors.ImageSharp.Tests.Formats.Jpg |
||||
|
{ |
||||
|
[Trait("Format", "Jpg")] |
||||
|
public partial class JpegEncoderTests |
||||
|
{ |
||||
|
[Theory] |
||||
|
[WithFile(TestImages.Jpeg.Issues.ValidExifArgumentNullExceptionOnEncode, PixelTypes.Rgba32)] |
||||
|
public void Encode_WithValidExifProfile_DoesNotThrowException<TPixel>(TestImageProvider<TPixel> provider) |
||||
|
where TPixel : unmanaged, IPixel<TPixel> |
||||
|
{ |
||||
|
Exception ex = Record.Exception(() => |
||||
|
{ |
||||
|
var encoder = new JpegEncoder(); |
||||
|
var stream = new MemoryStream(); |
||||
|
|
||||
|
using Image<TPixel> image = provider.GetImage(JpegDecoder); |
||||
|
image.Save(stream, encoder); |
||||
|
}); |
||||
|
|
||||
|
Assert.Null(ex); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,3 @@ |
|||||
|
version https://git-lfs.github.com/spec/v1 |
||||
|
oid sha256:4d41a41180a3371d0c4a724b40a4c86f6f975dab6be9da96964a484818770394 |
||||
|
size 30715 |
||||
Loading…
Reference in new issue