mirror of https://github.com/SixLabors/ImageSharp
Browse Source
Test Fails just now. Former-commit-id: da297b15e6ad9c6612378499e7506fade95174d8 Former-commit-id: 9c6106412771f797166983014b7cc976bdae3a3a Former-commit-id: 394581f30c0ef3e6beb50e32984d8b5315e81710pull/1/head
1 changed files with 39 additions and 0 deletions
@ -0,0 +1,39 @@ |
|||||
|
// <copyright file="SamplerTests.cs" company="James Jackson-South">
|
||||
|
// Copyright (c) James Jackson-South and contributors.
|
||||
|
// Licensed under the Apache License, Version 2.0.
|
||||
|
// </copyright>
|
||||
|
|
||||
|
namespace ImageProcessorCore.Tests |
||||
|
{ |
||||
|
using System.IO; |
||||
|
|
||||
|
using Xunit; |
||||
|
|
||||
|
public class JpegFileTests : FileTestBase |
||||
|
{ |
||||
|
[Fact] |
||||
|
public void ResolutionShouldChange() |
||||
|
{ |
||||
|
if (!Directory.Exists("TestOutput/Resolution")) |
||||
|
{ |
||||
|
Directory.CreateDirectory("TestOutput/Resolution"); |
||||
|
} |
||||
|
|
||||
|
foreach (string file in Files) |
||||
|
{ |
||||
|
using (FileStream stream = File.OpenRead(file)) |
||||
|
{ |
||||
|
string filename = Path.GetFileName(file); |
||||
|
|
||||
|
Image image = new Image(stream); |
||||
|
using (FileStream output = File.OpenWrite($"TestOutput/Resolution/{filename}")) |
||||
|
{ |
||||
|
image.VerticalResolution = 150; |
||||
|
image.HorizontalResolution = 150; |
||||
|
image.Save(output); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
Loading…
Reference in new issue