Skip to content

Commit 7380a63

Browse files
authored
Merge pull request #1 from SixLabors/master
Sync with imagesharp master
2 parents d65e152 + cdc63ad commit 7380a63

34 files changed

+3567
-1425
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ matrix:
66
- os: linux # Ubuntu 14.04
77
dist: trusty
88
sudo: required
9-
dotnet: 2.1.300-rc1-008673
9+
dotnet: 2.1.300
1010
mono: latest
1111
# - os: osx # OSX 10.11
1212
# osx_image: xcode7.3.1

ImageSharp.ruleset

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@
99
<Rule Id="SA1633" Action="None" />
1010
<!--1.1.0-beta6 incorrectly throws a wobbler here for multiline matrices-->
1111
<Rule Id="SA1500" Action="None" />
12+
<!--Comments should end with a period. I like this but there's 3000+ errors to fix-->
13+
<Rule Id="SA1629" Action="None" />
1214
</Rules>
1315
</RuleSet>

src/ImageSharp.Drawing/ImageSharp.Drawing.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0005" />
4141
<AdditionalFiles Include="..\..\stylecop.json" />
4242
<PackageReference Include="SixLabors.Shapes.Text" Version="1.0.0-beta0005" />
43-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta004">
43+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta007">
4444
<PrivateAssets>All</PrivateAssets>
4545
</PackageReference>
4646
</ItemGroup>

src/ImageSharp/Common/Helpers/DebugGuard.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ public static void IsFalse(bool target, string parameterName, string message)
189189
/// <param name="other">The 'other' span to compare 'target' to.</param>
190190
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
191191
/// <exception cref="ArgumentException">
192-
/// <paramref name="target"/> is true
192+
/// <paramref name="target"/> has a different size than <paramref name="other"/>
193193
/// </exception>
194194
[Conditional("DEBUG")]
195195
public static void MustBeSameSized<T>(Span<T> target, Span<T> other, string parameterName)
@@ -209,7 +209,7 @@ public static void MustBeSameSized<T>(Span<T> target, Span<T> other, string para
209209
/// <param name="minSpan">The 'minSpan' span to compare 'target' to.</param>
210210
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
211211
/// <exception cref="ArgumentException">
212-
/// <paramref name="target"/> is true
212+
/// <paramref name="target"/> has less items than <paramref name="minSpan"/>
213213
/// </exception>
214214
[Conditional("DEBUG")]
215215
public static void MustBeSizedAtLeast<T>(Span<T> target, Span<T> minSpan, string parameterName)

src/ImageSharp/Common/Helpers/Guard.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -207,14 +207,14 @@ public static void IsFalse(bool target, string parameterName, string message)
207207
}
208208

209209
/// <summary>
210-
/// Verifies, that the `source` span has the length of 'minSpan', or longer.
210+
/// Verifies, that the `source` span has the length of 'minLength', or longer.
211211
/// </summary>
212212
/// <typeparam name="T">The element type of the spans</typeparam>
213213
/// <param name="source">The source span.</param>
214214
/// <param name="minLength">The minimum length.</param>
215215
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
216216
/// <exception cref="ArgumentException">
217-
/// <paramref name="source"/> is true
217+
/// <paramref name="source"/> has less than <paramref name="minLength"/> items
218218
/// </exception>
219219
public static void MustBeSizedAtLeast<T>(ReadOnlySpan<T> source, int minLength, string parameterName)
220220
{
@@ -225,14 +225,14 @@ public static void MustBeSizedAtLeast<T>(ReadOnlySpan<T> source, int minLength,
225225
}
226226

227227
/// <summary>
228-
/// Verifies, that the `source` span has the length of 'minSpan', or longer.
228+
/// Verifies, that the `source` span has the length of 'minLength', or longer.
229229
/// </summary>
230230
/// <typeparam name="T">The element type of the spans</typeparam>
231231
/// <param name="source">The target span.</param>
232232
/// <param name="minLength">The minimum length.</param>
233233
/// <param name="parameterName">The name of the parameter that is to be checked.</param>
234234
/// <exception cref="ArgumentException">
235-
/// <paramref name="source"/> is true
235+
/// <paramref name="source"/> has less than <paramref name="minLength"/> items
236236
/// </exception>
237237
public static void MustBeSizedAtLeast<T>(Span<T> source, int minLength, string parameterName)
238238
{

src/ImageSharp/ImageSharp.csproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,17 @@
3737
<ItemGroup>
3838
<PackageReference Include="SixLabors.Core" Version="1.0.0-beta0005" />
3939
<AdditionalFiles Include="..\..\stylecop.json" />
40-
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta006">
40+
<PackageReference Include="StyleCop.Analyzers" Version="1.1.0-beta007">
4141
<PrivateAssets>All</PrivateAssets>
4242
</PackageReference>
43-
<PackageReference Include="System.Buffers" Version="4.4.0" />
44-
<PackageReference Include="System.Memory" Version="4.5.0-rc1" />
45-
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.0-rc1" />
43+
<PackageReference Include="System.Buffers" Version="4.5.0" />
44+
<PackageReference Include="System.Memory" Version="4.5.0" />
45+
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="4.5.0" />
4646
</ItemGroup>
4747
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard1.1' OR '$(TargetFramework)' == 'netstandard1.3'">
4848
<PackageReference Include="System.IO.Compression" Version="4.3.0" />
4949
<PackageReference Include="System.Threading.Tasks.Parallel" Version="4.3.0" />
50-
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
50+
<PackageReference Include="System.ValueTuple" Version="4.5.0" />
5151
</ItemGroup>
5252
<PropertyGroup>
5353
<CodeAnalysisRuleSet>..\..\ImageSharp.ruleset</CodeAnalysisRuleSet>

src/ImageSharp/PixelFormats/Rgba64.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ public override int GetHashCode()
221221
[MethodImpl(MethodImplOptions.AggressiveInlining)]
222222
private static ulong Pack(float x, float y, float z, float w)
223223
{
224-
return (ulong)Math.Round(x.Clamp(0, 1) * 65535F) |
225-
((ulong)Math.Round(y.Clamp(0, 1) * 65535F) << 16) |
226-
((ulong)Math.Round(z.Clamp(0, 1) * 65535F) << 32) |
227-
((ulong)Math.Round(w.Clamp(0, 1) * 65535F) << 48);
224+
return (ulong)MathF.Round(x.Clamp(0, 1) * 65535F) |
225+
((ulong)MathF.Round(y.Clamp(0, 1) * 65535F) << 16) |
226+
((ulong)MathF.Round(z.Clamp(0, 1) * 65535F) << 32) |
227+
((ulong)MathF.Round(w.Clamp(0, 1) * 65535F) << 48);
228228
}
229229
}
230230
}

tests/ImageSharp.Benchmarks/ImageSharp.Benchmarks.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
<Compile Include="..\ImageSharp.Tests\TestUtilities\TestEnvironment.cs" Link="Tests\TestEnvironment.cs" />
1717
</ItemGroup>
1818
<ItemGroup>
19-
<PackageReference Include="BenchmarkDotNet" Version="0.10.12" />
20-
<PackageReference Include="Colourful" Version="1.1.2" />
21-
<PackageReference Include="System.Drawing.Common" Version="4.5.0-rc1" />
19+
<PackageReference Include="BenchmarkDotNet" Version="0.10.14" />
20+
<PackageReference Include="Colourful" Version="1.2.2" />
21+
<PackageReference Include="System.Drawing.Common" Version="4.5.0" />
2222
</ItemGroup>
2323

2424
<ItemGroup>

tests/ImageSharp.Sandbox46/ImageSharp.Sandbox46.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<ItemGroup>
2121
<PackageReference Include="BitMiracle.LibJpeg.NET" Version="1.4.280" />
2222
<PackageReference Include="xunit" Version="2.3.1" />
23-
<PackageReference Include="Moq" Version="4.8.1" />
23+
<PackageReference Include="Moq" Version="4.8.2" />
2424
<!--<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.0.0" />-->
2525
<!--<PackageReference Include="xunit.runner.visualstudio" Version="2.2.0" />-->
2626
</ItemGroup>

tests/ImageSharp.Tests/ImageSharp.Tests.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@
2626
<None Include="PixelFormats\PixelOperationsTests.Blender.cs" />
2727
</ItemGroup>
2828
<ItemGroup>
29-
<PackageReference Include="Microsoft.CSharp" Version="4.4.1" />
30-
<PackageReference Include="System.Drawing.Common" Version="4.5.0-rc1" />
29+
<PackageReference Include="Microsoft.CSharp" Version="4.5.0" />
30+
<PackageReference Include="System.Drawing.Common" Version="4.5.0" />
3131
<PackageReference Include="xunit" Version="2.3.1" />
3232
<PackageReference Include="xunit.runner.console" Version="2.3.1" />
3333
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
34-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.0" />
34+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="15.7.2" />
3535
<PackageReference Include="xunit" Version="2.3.1" />
3636
<PackageReference Include="xunit.runner.visualstudio" Version="2.3.1" />
3737
<PackageReference Include="Moq" Version="4.8.2" />

0 commit comments

Comments
 (0)