Browse Source

Update to match latest trunk

pull/1552/head
James Jackson-South 6 years ago
parent
commit
4207950b3b
  1. 2
      src/ImageSharp/Formats/ImageDecoderUtilities.cs
  2. 4
      src/ImageSharp/Formats/WebP/AlphaCompressionMethod.cs
  3. 4
      src/ImageSharp/Formats/WebP/AlphaDecoder.cs
  4. 4
      src/ImageSharp/Formats/WebP/BitReader/BitReaderBase.cs
  5. 4
      src/ImageSharp/Formats/WebP/BitReader/Vp8BitReader.cs
  6. 4
      src/ImageSharp/Formats/WebP/BitReader/Vp8LBitReader.cs
  7. 4
      src/ImageSharp/Formats/WebP/IWebPDecoderOptions.cs
  8. 4
      src/ImageSharp/Formats/WebP/Lossless/ColorCache.cs
  9. 4
      src/ImageSharp/Formats/WebP/Lossless/HTreeGroup.cs
  10. 4
      src/ImageSharp/Formats/WebP/Lossless/HuffIndex.cs
  11. 4
      src/ImageSharp/Formats/WebP/Lossless/HuffmanCode.cs
  12. 4
      src/ImageSharp/Formats/WebP/Lossless/HuffmanUtils.cs
  13. 4
      src/ImageSharp/Formats/WebP/Lossless/LosslessUtils.cs
  14. 4
      src/ImageSharp/Formats/WebP/Lossless/Vp8LDecoder.cs
  15. 4
      src/ImageSharp/Formats/WebP/Lossless/Vp8LMetadata.cs
  16. 4
      src/ImageSharp/Formats/WebP/Lossless/Vp8LTransform.cs
  17. 4
      src/ImageSharp/Formats/WebP/Lossless/Vp8LTransformType.cs
  18. 4
      src/ImageSharp/Formats/WebP/Lossless/WebPLosslessDecoder.cs
  19. 4
      src/ImageSharp/Formats/WebP/Lossy/IntraPredictionMode.cs
  20. 4
      src/ImageSharp/Formats/WebP/Lossy/LoopFilter.cs
  21. 4
      src/ImageSharp/Formats/WebP/Lossy/LossyUtils.cs
  22. 4
      src/ImageSharp/Formats/WebP/Lossy/VP8BandProbas.cs
  23. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8Decoder.cs
  24. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8FilterHeader.cs
  25. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8FilterInfo.cs
  26. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8FrameHeader.cs
  27. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8Io.cs
  28. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlock.cs
  29. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlockData.cs
  30. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8PictureHeader.cs
  31. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8Proba.cs
  32. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8ProbaArray.cs
  33. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8QuantMatrix.cs
  34. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8SegmentHeader.cs
  35. 4
      src/ImageSharp/Formats/WebP/Lossy/Vp8TopSamples.cs
  36. 4
      src/ImageSharp/Formats/WebP/Lossy/WebPLossyDecoder.cs
  37. 4
      src/ImageSharp/Formats/WebP/Vp8HeaderType.cs
  38. 4
      src/ImageSharp/Formats/WebP/WebPAlphaFilterType.cs
  39. 4
      src/ImageSharp/Formats/WebP/WebPBitsPerPixel.cs
  40. 4
      src/ImageSharp/Formats/WebP/WebPChunkType.cs
  41. 4
      src/ImageSharp/Formats/WebP/WebPConstants.cs
  42. 26
      src/ImageSharp/Formats/WebP/WebPDecoder.cs
  43. 72
      src/ImageSharp/Formats/WebP/WebPDecoderCore.cs
  44. 4
      src/ImageSharp/Formats/WebP/WebPFeatures.cs
  45. 4
      src/ImageSharp/Formats/WebP/WebPFormat.cs
  46. 4
      src/ImageSharp/Formats/WebP/WebPFormatType.cs
  47. 4
      src/ImageSharp/Formats/WebP/WebPImageFormatDetector.cs
  48. 4
      src/ImageSharp/Formats/WebP/WebPImageInfo.cs
  49. 4
      src/ImageSharp/Formats/WebP/WebPLookupTables.cs
  50. 4
      src/ImageSharp/Formats/WebP/WebPMetadata.cs
  51. 4
      src/ImageSharp/Formats/WebP/WebPThrowHelper.cs
  52. 4
      src/ImageSharp/Formats/WebP/WebpConfigurationModule.cs
  53. 4
      tests/ImageSharp.Benchmarks/Codecs/DecodeWebp.cs
  54. 4
      tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs
  55. 4
      tests/ImageSharp.Tests/Formats/WebP/WebPMetaDataTests.cs

2
src/ImageSharp/Formats/ImageDecoderUtilities.cs

@ -1,4 +1,4 @@
// Copyright (c) Six Labors.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.IO;

4
src/ImageSharp/Formats/WebP/AlphaCompressionMethod.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
src/ImageSharp/Formats/WebP/AlphaDecoder.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers;

4
src/ImageSharp/Formats/WebP/BitReader/BitReaderBase.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers;

4
src/ImageSharp/Formats/WebP/BitReader/Vp8BitReader.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Buffers;
using System.Buffers.Binary;

4
src/ImageSharp/Formats/WebP/BitReader/Vp8LBitReader.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Buffers;
using System.IO;

4
src/ImageSharp/Formats/WebP/IWebPDecoderOptions.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
src/ImageSharp/Formats/WebP/Lossless/ColorCache.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossless
{

4
src/ImageSharp/Formats/WebP/Lossless/HTreeGroup.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Collections.Generic;

4
src/ImageSharp/Formats/WebP/Lossless/HuffIndex.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossless
{

4
src/ImageSharp/Formats/WebP/Lossless/HuffmanCode.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Diagnostics;

4
src/ImageSharp/Formats/WebP/Lossless/HuffmanUtils.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;

4
src/ImageSharp/Formats/WebP/Lossless/LosslessUtils.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Runtime.CompilerServices;

4
src/ImageSharp/Formats/WebP/Lossless/Vp8LDecoder.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers;

4
src/ImageSharp/Formats/WebP/Lossless/Vp8LMetadata.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Buffers;

4
src/ImageSharp/Formats/WebP/Lossless/Vp8LTransform.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Buffers;
using System.Diagnostics;

4
src/ImageSharp/Formats/WebP/Lossless/Vp8LTransformType.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossless
{

4
src/ImageSharp/Formats/WebP/Lossless/WebPLosslessDecoder.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers;

4
src/ImageSharp/Formats/WebP/Lossy/IntraPredictionMode.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/LoopFilter.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/LossyUtils.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers.Binary;

4
src/ImageSharp/Formats/WebP/Lossy/VP8BandProbas.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8Decoder.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers;

4
src/ImageSharp/Formats/WebP/Lossy/Vp8FilterHeader.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8FilterInfo.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8FrameHeader.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8Io.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;

4
src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlock.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8MacroBlockData.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8PictureHeader.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8Proba.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8ProbaArray.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8QuantMatrix.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8SegmentHeader.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/Vp8TopSamples.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP.Lossy
{

4
src/ImageSharp/Formats/WebP/Lossy/WebPLossyDecoder.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers;

4
src/ImageSharp/Formats/WebP/Vp8HeaderType.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
src/ImageSharp/Formats/WebP/WebPAlphaFilterType.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
src/ImageSharp/Formats/WebP/WebPBitsPerPixel.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
src/ImageSharp/Formats/WebP/WebPChunkType.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
src/ImageSharp/Formats/WebP/WebPConstants.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Collections.Generic;

26
src/ImageSharp/Formats/WebP/WebPDecoder.cs

@ -1,7 +1,8 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.IO;
using System.Threading.Tasks;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats.WebP
@ -35,5 +36,26 @@ namespace SixLabors.ImageSharp.Formats.WebP
/// <inheritdoc />
public Image Decode(Configuration configuration, Stream stream) => this.Decode<Rgba32>(configuration, stream);
/// <inheritdoc />
public Task<Image<TPixel>> DecodeAsync<TPixel>(Configuration configuration, Stream stream)
where TPixel : unmanaged, IPixel<TPixel>
{
Guard.NotNull(stream, nameof(stream));
return new WebPDecoderCore(configuration, this).DecodeAsync<TPixel>(stream);
}
/// <inheritdoc />
public async Task<Image> DecodeAsync(Configuration configuration, Stream stream)
=> await this.DecodeAsync<Rgba32>(configuration, stream).ConfigureAwait(false);
/// <inheritdoc />
public Task<IImageInfo> IdentifyAsync(Configuration configuration, Stream stream)
{
Guard.NotNull(stream, nameof(stream));
return new WebPDecoderCore(configuration, this).IdentifyAsync(stream);
}
}
}

72
src/ImageSharp/Formats/WebP/WebPDecoderCore.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers.Binary;
@ -19,18 +19,13 @@ namespace SixLabors.ImageSharp.Formats.WebP
/// <summary>
/// Performs the webp decoding operation.
/// </summary>
internal sealed class WebPDecoderCore
internal sealed class WebPDecoderCore : IImageDecoderInternals
{
/// <summary>
/// Reusable buffer.
/// </summary>
private readonly byte[] buffer = new byte[4];
/// <summary>
/// The global configuration.
/// </summary>
private readonly Configuration configuration;
/// <summary>
/// Used for allocating memory during processing operations.
/// </summary>
@ -53,7 +48,7 @@ namespace SixLabors.ImageSharp.Formats.WebP
/// <param name="options">The options.</param>
public WebPDecoderCore(Configuration configuration, IWebPDecoderOptions options)
{
this.configuration = configuration;
this.Configuration = configuration;
this.memoryAllocator = configuration.MemoryAllocator;
this.IgnoreMetadata = options.IgnoreMetadata;
}
@ -68,6 +63,9 @@ namespace SixLabors.ImageSharp.Formats.WebP
/// </summary>
public ImageMetadata Metadata { get; private set; }
/// <inheritdoc/>
public Configuration Configuration { get; }
/// <summary>
/// Decodes the image from the specified <see cref="Stream"/> and sets the data to the image.
/// </summary>
@ -87,16 +85,16 @@ namespace SixLabors.ImageSharp.Formats.WebP
WebPThrowHelper.ThrowNotSupportedException("Animations are not supported");
}
var image = new Image<TPixel>(this.configuration, (int)imageInfo.Width, (int)imageInfo.Height, this.Metadata);
var image = new Image<TPixel>(this.Configuration, (int)imageInfo.Width, (int)imageInfo.Height, this.Metadata);
Buffer2D<TPixel> pixels = image.GetRootFramePixelBuffer();
if (imageInfo.IsLossless)
{
var losslessDecoder = new WebPLosslessDecoder(imageInfo.Vp8LBitReader, this.memoryAllocator, this.configuration);
var losslessDecoder = new WebPLosslessDecoder(imageInfo.Vp8LBitReader, this.memoryAllocator, this.Configuration);
losslessDecoder.Decode(pixels, image.Width, image.Height);
}
else
{
var lossyDecoder = new WebPLossyDecoder(imageInfo.Vp8BitReader, this.memoryAllocator, this.configuration);
var lossyDecoder = new WebPLossyDecoder(imageInfo.Vp8BitReader, this.memoryAllocator, this.Configuration);
lossyDecoder.Decode(pixels, image.Width, image.Height, imageInfo);
}
@ -326,11 +324,11 @@ namespace SixLabors.ImageSharp.Formats.WebP
}
var vp8FrameHeader = new Vp8FrameHeader()
{
KeyFrame = true,
Profile = (sbyte)version,
PartitionLength = partitionLength
};
{
KeyFrame = true,
Profile = (sbyte)version,
PartitionLength = partitionLength
};
var bitReader = new Vp8BitReader(
this.currentStream,
@ -340,18 +338,18 @@ namespace SixLabors.ImageSharp.Formats.WebP
bitReader.Remaining = remaining;
return new WebPImageInfo()
{
Width = width,
Height = height,
XScale = xScale,
YScale = yScale,
BitsPerPixel = features?.Alpha == true ? WebPBitsPerPixel.Pixel32 : WebPBitsPerPixel.Pixel24,
IsLossless = false,
Features = features,
Vp8Profile = (sbyte)version,
Vp8FrameHeader = vp8FrameHeader,
Vp8BitReader = bitReader
};
{
Width = width,
Height = height,
XScale = xScale,
YScale = yScale,
BitsPerPixel = features?.Alpha == true ? WebPBitsPerPixel.Pixel32 : WebPBitsPerPixel.Pixel24,
IsLossless = false,
Features = features,
Vp8Profile = (sbyte)version,
Vp8FrameHeader = vp8FrameHeader,
Vp8BitReader = bitReader
};
}
/// <summary>
@ -396,14 +394,14 @@ namespace SixLabors.ImageSharp.Formats.WebP
}
return new WebPImageInfo()
{
Width = width,
Height = height,
BitsPerPixel = WebPBitsPerPixel.Pixel32,
IsLossless = true,
Features = features,
Vp8LBitReader = bitReader
};
{
Width = width,
Height = height,
BitsPerPixel = WebPBitsPerPixel.Pixel32,
IsLossless = true,
Features = features,
Vp8LBitReader = bitReader
};
}
/// <summary>

4
src/ImageSharp/Formats/WebP/WebPFeatures.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Buffers;

4
src/ImageSharp/Formats/WebP/WebPFormat.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Collections.Generic;

4
src/ImageSharp/Formats/WebP/WebPFormatType.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
src/ImageSharp/Formats/WebP/WebPImageFormatDetector.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;

4
src/ImageSharp/Formats/WebP/WebPImageInfo.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using SixLabors.ImageSharp.Formats.WebP.BitReader;

4
src/ImageSharp/Formats/WebP/WebPLookupTables.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Collections.Generic;

4
src/ImageSharp/Formats/WebP/WebPMetadata.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.Collections.Generic;

4
src/ImageSharp/Formats/WebP/WebPThrowHelper.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.Runtime.CompilerServices;

4
src/ImageSharp/Formats/WebP/WebpConfigurationModule.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
namespace SixLabors.ImageSharp.Formats.WebP
{

4
tests/ImageSharp.Benchmarks/Codecs/DecodeWebp.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.IO;
using BenchmarkDotNet.Attributes;

4
tests/ImageSharp.Tests/Formats/WebP/WebPDecoderTests.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using System.IO;

4
tests/ImageSharp.Tests/Formats/WebP/WebPMetaDataTests.cs

@ -1,5 +1,5 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the GNU Affero General Public License, Version 3.
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
using SixLabors.ImageSharp.Formats.WebP;
using SixLabors.ImageSharp.PixelFormats;

Loading…
Cancel
Save