Browse Source
Merge branch 'master' into patternVectorNotUsed
af/merge-core
Anton Firsov
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with
8 additions and
75 deletions
-
src/ImageSharp/Advanced/AotCompilerTools.cs
-
src/ImageSharp/Common/Exceptions/UnknownImageFormatException.cs
-
src/ImageSharp/Common/Extensions/EnumerableExtensions.cs
-
src/ImageSharp/Common/Helpers/Guard.cs
-
src/ImageSharp/Formats/Gif/GifEncoderCore.cs
-
src/ImageSharp/Formats/Jpeg/Components/Decoder/ColorConverters/JpegColorConverter.FromCmyk.cs
-
src/ImageSharp/Formats/Jpeg/Components/Decoder/ColorConverters/JpegColorConverter.FromGrayScale.cs
-
src/ImageSharp/Formats/Jpeg/Components/Decoder/ColorConverters/JpegColorConverter.FromRgb.cs
-
src/ImageSharp/Formats/Jpeg/Components/Decoder/ColorConverters/JpegColorConverter.FromYccK.cs
-
src/ImageSharp/Formats/Png/IPngDecoderOptions.cs
-
src/ImageSharp/Formats/Png/PngDecoder.cs
-
tests/ImageSharp.Tests/Drawing/Text/DrawText.cs
-
tests/ImageSharp.Tests/Formats/Gif/GifDecoderTests.cs
-
tests/ImageSharp.Tests/Formats/Gif/GifMetaDataTests.cs
-
tests/ImageSharp.Tests/MetaData/ImageMetaDataTests.cs
-
tests/ImageSharp.Tests/MetaData/Profiles/Exif/ExifProfileTests.cs
|
|
|
@ -9,7 +9,6 @@ using SixLabors.ImageSharp.Processing; |
|
|
|
using SixLabors.ImageSharp.Processing.Processors.Dithering; |
|
|
|
using SixLabors.ImageSharp.Processing.Processors.Quantization; |
|
|
|
using SixLabors.ImageSharp.Processing.Processors.Transforms; |
|
|
|
using SixLabors.Primitives; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Advanced |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1,8 +1,6 @@ |
|
|
|
// Copyright (c) Six Labors and contributors.
|
|
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
|
|
|
|
using System; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
@ -20,17 +18,5 @@ namespace SixLabors.ImageSharp |
|
|
|
: base(errorMessage) |
|
|
|
{ |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Initializes a new instance of the <see cref="UnknownImageFormatException"/> class with a specified
|
|
|
|
/// error message and the exception that is the cause of this exception.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="errorMessage">The error message that explains the reason for this exception.</param>
|
|
|
|
/// <param name="innerException">The exception that is the cause of the current exception, or a null reference (Nothing in Visual Basic)
|
|
|
|
/// if no inner exception is specified.</param>
|
|
|
|
public UnknownImageFormatException(string errorMessage, Exception innerException) |
|
|
|
: base(errorMessage, innerException) |
|
|
|
{ |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -11,33 +11,6 @@ namespace SixLabors.ImageSharp.Common |
|
|
|
/// </summary>
|
|
|
|
internal static class EnumerableExtensions |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
/// Generates a sequence of integral numbers within a specified range.
|
|
|
|
/// </summary>
|
|
|
|
/// <param name="fromInclusive">
|
|
|
|
/// The start index, inclusive.
|
|
|
|
/// </param>
|
|
|
|
/// <param name="toExclusive">
|
|
|
|
/// The end index, exclusive.
|
|
|
|
/// </param>
|
|
|
|
/// <param name="step">
|
|
|
|
/// The incremental step.
|
|
|
|
/// </param>
|
|
|
|
/// <returns>
|
|
|
|
/// The <see cref="IEnumerable{Int32}"/> that contains a range of sequential integral numbers.
|
|
|
|
/// </returns>
|
|
|
|
public static IEnumerable<int> SteppedRange(int fromInclusive, int toExclusive, int step) |
|
|
|
{ |
|
|
|
// Borrowed from Enumerable.Range
|
|
|
|
long num = (fromInclusive + toExclusive) - 1L; |
|
|
|
if ((toExclusive < 0) || (num > 0x7fffffffL)) |
|
|
|
{ |
|
|
|
throw new ArgumentOutOfRangeException(nameof(toExclusive)); |
|
|
|
} |
|
|
|
|
|
|
|
return RangeIterator(fromInclusive, i => i < toExclusive, step); |
|
|
|
} |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Generates a sequence of integral numbers within a specified range.
|
|
|
|
/// </summary>
|
|
|
|
|
|
|
|
@ -2,7 +2,6 @@ |
|
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Diagnostics; |
|
|
|
using System.Runtime.CompilerServices; |
|
|
|
|
|
|
|
|
|
|
|
@ -6,7 +6,6 @@ using System.Buffers; |
|
|
|
using System.IO; |
|
|
|
using System.Runtime.CompilerServices; |
|
|
|
using System.Runtime.InteropServices; |
|
|
|
using System.Text; |
|
|
|
|
|
|
|
using SixLabors.ImageSharp.Advanced; |
|
|
|
using SixLabors.ImageSharp.Memory; |
|
|
|
|
|
|
|
@ -25,11 +25,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder.ColorConverters |
|
|
|
|
|
|
|
var v = new Vector4(0, 0, 0, 1F); |
|
|
|
|
|
|
|
var scale = new Vector4( |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1F); |
|
|
|
var maximum = 1 / this.MaximumValue; |
|
|
|
var scale = new Vector4(maximum, maximum, maximum, 1F); |
|
|
|
|
|
|
|
for (int i = 0; i < result.Length; i++) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -19,11 +19,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder.ColorConverters |
|
|
|
|
|
|
|
public override void ConvertToRgba(in ComponentValues values, Span<Vector4> result) |
|
|
|
{ |
|
|
|
var scale = new Vector4( |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1F); |
|
|
|
var maximum = 1 / this.MaximumValue; |
|
|
|
var scale = new Vector4(maximum, maximum, maximum, 1F); |
|
|
|
|
|
|
|
ref float sBase = ref MemoryMarshal.GetReference(values.Component0); |
|
|
|
ref Vector4 dBase = ref MemoryMarshal.GetReference(result); |
|
|
|
|
|
|
|
@ -24,11 +24,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder.ColorConverters |
|
|
|
|
|
|
|
var v = new Vector4(0, 0, 0, 1); |
|
|
|
|
|
|
|
var scale = new Vector4( |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1F); |
|
|
|
var maximum = 1 / this.MaximumValue; |
|
|
|
var scale = new Vector4(maximum, maximum, maximum, 1F); |
|
|
|
|
|
|
|
for (int i = 0; i < result.Length; i++) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -25,11 +25,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder.ColorConverters |
|
|
|
|
|
|
|
var v = new Vector4(0, 0, 0, 1F); |
|
|
|
|
|
|
|
var scale = new Vector4( |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1 / this.MaximumValue, |
|
|
|
1F); |
|
|
|
var maximum = 1 / this.MaximumValue; |
|
|
|
var scale = new Vector4(maximum, maximum, maximum, 1F); |
|
|
|
|
|
|
|
for (int i = 0; i < result.Length; i++) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -1,8 +1,6 @@ |
|
|
|
// Copyright (c) Six Labors and contributors.
|
|
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
|
|
|
|
using System.Text; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Formats.Png |
|
|
|
{ |
|
|
|
/// <summary>
|
|
|
|
|
|
|
|
@ -2,7 +2,6 @@ |
|
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
|
|
|
|
using System.IO; |
|
|
|
using System.Text; |
|
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Formats.Png |
|
|
|
|
|
|
|
@ -3,11 +3,9 @@ |
|
|
|
|
|
|
|
using System.Numerics; |
|
|
|
using SixLabors.Fonts; |
|
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
|
using SixLabors.ImageSharp.Processing; |
|
|
|
using SixLabors.ImageSharp.Processing.Processors.Text; |
|
|
|
using SixLabors.Primitives; |
|
|
|
using SixLabors.Shapes; |
|
|
|
using Xunit; |
|
|
|
|
|
|
|
namespace SixLabors.ImageSharp.Tests.Drawing.Text |
|
|
|
|
|
|
|
@ -4,7 +4,6 @@ |
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.Text; |
|
|
|
using SixLabors.ImageSharp.Advanced; |
|
|
|
using SixLabors.ImageSharp.Formats.Gif; |
|
|
|
using SixLabors.ImageSharp.Metadata; |
|
|
|
|
|
|
|
@ -4,7 +4,6 @@ |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
|
|
|
|
using SixLabors.ImageSharp.Formats.Gif; |
|
|
|
using SixLabors.ImageSharp.Metadata; |
|
|
|
|
|
|
|
@ -1,9 +1,6 @@ |
|
|
|
// Copyright (c) Six Labors and contributors.
|
|
|
|
// Licensed under the Apache License, Version 2.0.
|
|
|
|
|
|
|
|
using System.Collections.Generic; |
|
|
|
|
|
|
|
using SixLabors.ImageSharp.Formats.Gif; |
|
|
|
using SixLabors.ImageSharp.Metadata; |
|
|
|
using SixLabors.ImageSharp.Metadata.Profiles.Exif; |
|
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
|
|
|
|
|
@ -7,7 +7,6 @@ using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Text; |
|
|
|
using SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder; |
|
|
|
using SixLabors.ImageSharp.Metadata; |
|
|
|
using SixLabors.ImageSharp.Metadata.Profiles.Exif; |
|
|
|
using SixLabors.ImageSharp.PixelFormats; |
|
|
|
|