Browse Source

introduce decoderCore classes (without implementation)

pull/1552/head
Peter Amrehn 7 years ago
parent
commit
c0f455fe2d
  1. 14
      src/ImageSharp/Formats/WebP/ExtendedDecoder.cs
  2. 14
      src/ImageSharp/Formats/WebP/SimpleLosslessDecoder.cs
  3. 14
      src/ImageSharp/Formats/WebP/SimpleLossyDecoder.cs
  4. 1
      src/ImageSharp/Formats/WebP/WebPDecoder.cs
  5. 18
      src/ImageSharp/Formats/WebP/WebPDecoderCoreBase.cs

14
src/ImageSharp/Formats/WebP/ExtendedDecoder.cs

@ -0,0 +1,14 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.IO;
namespace SixLabors.ImageSharp.Formats.WebP
{
class ExtendedDecoderCore : WebPDecoderCoreBase
{
public override Image<TPixel> Decode<TPixel>(Stream stream)
=> throw new NotImplementedException();
}
}

14
src/ImageSharp/Formats/WebP/SimpleLosslessDecoder.cs

@ -0,0 +1,14 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.IO;
namespace SixLabors.ImageSharp.Formats.WebP
{
class SimpleLosslessDecoder : WebPDecoderCoreBase
{
public override Image<TPixel> Decode<TPixel>(Stream stream)
=> throw new NotImplementedException();
}
}

14
src/ImageSharp/Formats/WebP/SimpleLossyDecoder.cs

@ -0,0 +1,14 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System;
using System.IO;
namespace SixLabors.ImageSharp.Formats.WebP
{
class SimpleLossyDecoder : WebPDecoderCoreBase
{
public override Image<TPixel> Decode<TPixel>(Stream stream)
=> throw new NotImplementedException();
}
}

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

@ -15,6 +15,7 @@ namespace SixLabors.ImageSharp.Formats.WebP
public Image<TPixel> Decode<TPixel>(Configuration configuration, Stream stream) public Image<TPixel> Decode<TPixel>(Configuration configuration, Stream stream)
where TPixel : struct, IPixel<TPixel> where TPixel : struct, IPixel<TPixel>
{ {
// TODO: [brianpopow] parse chunks and decide which decoder (subclass of WebPDecoderCoreBase) to use
throw new System.NotImplementedException(); throw new System.NotImplementedException();
} }

18
src/ImageSharp/Formats/WebP/WebPDecoderCoreBase.cs

@ -0,0 +1,18 @@
// Copyright (c) Six Labors and contributors.
// Licensed under the Apache License, Version 2.0.
using System.IO;
using SixLabors.ImageSharp.PixelFormats;
namespace SixLabors.ImageSharp.Formats.WebP
{
/// <summary>
/// Base class for the WebP image decoders.
/// </summary>
public abstract class WebPDecoderCoreBase
{
public abstract Image<TPixel> Decode<TPixel>(Stream stream)
where TPixel : struct, IPixel<TPixel>;
}
}
Loading…
Cancel
Save